- Skip CI tests on Windows/free-threaded python (#163).
- Expanded exception preservation to more scenarios (#161, #162).
- Enable builds for free-threading Python versions (#157).
- Adjustment to exception handling (#159).
- Remove Python 3.7 builds (#160).
- Adjustments to CI configuration (#154).
- Preserve exception information when reading from a Python file-like (#152).
- Enable Python 3.13 builds (#150).
- Enable Python 3.12 and
musllinux
builds (#139). - Remove
numpy
as a mandatory build-time dependency (#142, #143).
- Updates to package build process (#138).
- Change the
IndexedGzipFile
class to raise aFileNotFoundError
instead of aValueError
, when a path to a non-existent file is provided (#137).
- Another adjustment to package build process (#135).
- Adjustment to package build process (#134).
- Now building packages for python >=3.7, as recent versions of setuptools do not support older Python versions (#133).
- Compatibility fixes for Python 3.12 and Cython 3.0.0 (#126, #127).
- Removed support for Python 2.7 (#128).
- Small change to the
IndexedGzipFile
class so that it accepts file-likes which do not implementfileno()
(#118).
- Changes to allow an index to be built from file-likes which don't support
seek()
ortell()
operations (#103, #105).
- Changed the default read buffer size used by the
IndexedGzipFile
class (#90). - Update to wheel building procedure (#92,#93,#95,#96,#97,#98,#99).
- Aded
pyproject.toml
to declare build-time requirements (#94).
- Fixed a bug related to buffering input data, which was causing a spurious
CrcError
(#80, #87).
- Relaxed
mode
check when creating anIndexedGzipFile
from an open file handle -fileobj.mode
may now be'r'
or'rb'
(or may not exist at all) (#85, #86).
- Fixed a memory leak when initialising decompression / inflation (#82, #83).
- Added file name to exception messages when possible, to assist in diagnosing errors (#84).
- Tests requiring
nibabel
are now skipped, rather than causing failure (#78).
- Python 2.7 wheels for Windows are no longer being built (#71, #73).
- A backwards-compatible change to the index file format, to accommodate seek
points at stream boundaries. Index files created with older versions of
indexed_gzip
can still be loaded, but index files created withindexed_gzip
1.6.0 cannot be loaded by older versions ofindexed_gzip
(#75). - CRC and size validation of uncompressed data is now performed by default,
on the first pass through a GZIP file. This can be disabled by setting the
new
skip_crc_check
argument toFalse
when creating anIndexedGzipFile
. Validation is not performed when an existing index is imported from file (#72). - Null padding bytes at the end of a GZIP file, or in between GZIP streams, are now skipped over (#69, #70, #72).
- Seek points are now created at the beginning of every GZIP stream, in files containing concatenated streams (#72).
- Restored wheel building for Python 2.7 on 32 bit Windows (#64, #66).
- Now building wheels for
aarch64
on Linux, andamd64
/universal2
on macOS (#66). - Fixed some un-initialised pointers (#65).
- Fixed a bug in the use of
PyErr_Occurred
(#63).
- Not providing binary wheels for Python 2.7 on 32 bit Windows (#61).
- Minor adjustments to some unit test (#60).
- Added support for in-memory file-like objects (#55).
- Fixed a bug whereby a segmentation fault could occur if an
IndexedGzipFile
was created with a path to a non-existent file (#56).
- Fixed a bug in the pickling/copying logic in the
IndexedGzipFile
class (#50, #51) - New
indexed_gzip.open
function, which just creates and returns anIndexedGzipFile
. - When creating an
IndexedGzipFile
, the first argument (filename
) may be either a file name, or an open file handle (#49, #53). - Migrated CI testing and building to Github Actions (#52).
- Binary wheels for Windows now have ZLIB statically compiled in as part of the wheel, so ZLIB no longer needs to be installed (#43, #52).
- Adjusted the
ZranError
exception type to sub-class fromIOError
, to ease support fornibabel
. - Fixed a bug related to concatenated GZIP files which would occur when the read buffer ran out of space at the point where a stream boundary occurred.
- Adjusted the
NoHandleError
andNotCoveredError
types to sub-class fromValueError
, to preserve backwards compatibility with older versions ofnibabel
.
- Reverted the error type raised by the
IndexedGzipFile.seek
toValueError
, asnibabel
assumes that theseek
method of file objects raise aValueError
ifSEEK_END
is not supported.
- The
IndexedGzipFile.seek
method now accepts seeking from the end of uncompressed stream viaSEEK_END
, as long as the index has been built (#37).
- New
IndexedGzipFile.seek_points
method, which returns the compressed and uncompressed seek point locations.
IndexedGzipFile
objects are now picklable, as long as they are created with the default setting ofdrop_handles=True
and with afilename
and not an openfileobj
(#28, #31).- Changed the return type of
zran_tell
fromlong
touint64_t
, because the former is not guaranteed to be 64 bit (#29, #30). - Changed the
zran_index_t.compressed_size
anduncompressed_size
fields fromsize_t
touint64_t
because the former is not guaranteed to be 64 bit.
- Removed the deprecated
fid
argument to theIndexedGzipFile
constructor. - Removed the
SafeIndexedGzipFile
.
- Fix to package metadata.
- The
IndexedGzipFile.import_index
method andzran_import_index
function can handle index files which do not contain any index points (#18).
- Fixed bug affecting files which were an exact multiple of the read buffer size (#15).
- Internal changes to how file handles are managed, to improve Windows compatibility.
- The
_IndexedGzipFile.read
method now acquires a single file handle, rather than opening/closing multiple handles across calls tozran_read
.
- Workaround for issues with Python 2.7 and Cython < 0.26 (#10).
- Minor changes to packging.
- Removed
pytest-runner
as a dependency.
- Bugfix - variious methods and attributes were missing from the
IndexedGzipFile
wrapper class (#9).
Changes in this release:
- Bugfix in deprecated
SafeIndexedGzipFile
.
Changes in this release:
- Updated conda metadata.
Changes in this release:
- Added ability to import/export the index, via new
import_index
andexport_index
methods on theIndexedGzipFile
class (#7, #8) - thanks @ozars ! - Deprecated
SafeIndexedGzipFile
- theIndexedGzipFile
is now thread-safe, and has a read buffer. If you don't want buffering or thread-safety, use the_IndexedGzipFile
class. - Fixed bug in
seek
method - was not working with negative offsets. - More unit tests, and code coverage of
.py
and.pyx
files.
Changes in this release:
- Added
.conda/meta.yaml
file for building conda packages
Changes in this release:
-
IndexedGzipFile.__init__
has a new option,drop_handles
which causes anIndexedGzipFile
to close/re-open the underlying file handle on every access (#5, #6). This has no impact on performance (as measured by the new benchmark script), so is enabled by default. -
New simpler benchmark script.
-
Deprecated the
fid
parameter toIndexedGzipFile.__init__
in favour offileobj
- another change to makeIndexedGzipFile
more similar togzip.GzipFile
.
Changes in this release:
IndexedGzipFile
now has areadinto
method.SafeIndexedGzipFile
is now anio.BufferedReader
, which provides thread safety and dramatically improves performance for small files (see discussion at nipy/nibabel#558).- Fixed issue #4 - the source distribution was missing
zran.h
.
Changes in this release:
-
Preliminary support for Windows platforms (#1, #3) Thanks to @mcraig-ibme and @Trigonometry !
-
Added
mode
attribute toIndexedGzipFile
.
Changes in this release:
- Unit tests are run on a 32 bit platform
- The
indexed_gzip
package now has a__version__
attribute
Changes in this release:
-
Re-arranged code layout - there is now a top level
indexed_gzip
package, which contains theindexed_gzip
module, and thetests
package. Done so that tests can be distributed properly. No API changes though. -
zran_seek
input parameter types made more specific due to an issue on 32 bit platforms.
Changes in this release:
- A tiny adjustment to unit test management allowing tests to be run from a different directory
Changes in this release involve modifications and additions to the
IndexedGzipFile
class to make it look and behave more like the built-in
gzip.GzipFile
class.
-
__init__
acceptsfilename
andmode
as its first two parameters -
Changed default values for
__init__
parameters to values which have been qualitatively tested -
readline
,readlines
,__iter__
and__next__
methods added, for iteration over lines in text data -
seek
method accepts awhence
parameter, and allows seeking fromSEEK_SET
orSEEK_CUR
,
Changes in this release:
SafeIndexedGzipFile
was broken under python 3.
Changes in this release:
- Bugfix (PR #2)
Changes in this release:
- One critical, silly bugfix that should have been in 0.3.
Changes in this release:
- Support for reading > 2**32 bytes in a single call.
- Support for concatenated gzip streams.
- Many related bug fixes.
zran.c
refactored so it is much cleaner and clearer.- Test suite is much more comprehensive
The following changes have been made in this release:
indexed_gzip
now releases the GIL when possible- A new
SafeIndexedGzipFile
class provides simple thread-safe file access to compressed files. - Some initial test coverage using https://travis-ci.org
- Some important bug fixes.
- First seemingly stable release.