You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Added
- Added support for gzip, bzip2, xz and Zstandard compression to `load()`, `stream()`, `save()` and `append()` as requested in [#1](#1).
- Created `py.typed`.
- Ensured that `load()`, `stream()`, `save()` and `append()` are tested with compressed jsonl files.
### Changed
- Changed `stream()` to return a `generator` rather than a `map`.
- Changed `load()`, `stream()`, `save()` and `append()` to rely on [`xopen.xopen()`](https://github.com/pycompression/xopen/#xopen) rather than [`open()`](https://docs.python.org/3/library/functions.html#open).
- Updated the package description and README file to reflect the fact that `orjsonl` now supports compression.
### Fixed
- Fixed [#1](#1) by ensuring that `stream()` closes jsonl files whenever a `generator` has been exhuasted.
- Corrected typos in the changelog.
- Corrected typos in docstrings.
- Ensured that optional arguments are type hinted as such.
### Removed
- Removed support for integer file descriptors.
To me it would be essential to support compression.
I've just updated the library to support gzip, bzip2, xz and Zstandard compression.
, could lead to a memory leak when the open file isn't closed.
Good pickup. The file didn't appear to close even when the map object had been exhuasted. I've fixed that by changing stream() into a generator function and enclosing for json in line: yield orjson.loads(json) in a with statement.
To me it would be essential to support compression.
As well, I believe,
orjsonl/src/orjsonl/orjsonl.py
Line 18 in 4de8ff7
The text was updated successfully, but these errors were encountered: