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
As discussed in the zlib FAQ, DEFATE-compressed data is not designed for random access:
Can I access data randomly in a compressed stream?
No, not without some preparation. If when compressing you periodically use Z_FULL_FLUSH, carefully write all the pending data at those points, and keep an index of those locations, then you can start decompression at those points. You have to be careful to not use Z_FULL_FLUSH too often, since it can significantly degrade compression. Alternatively, you can scan a deflate stream once to generate an index, and then use that index for random access. See examples/zran.c.
However, as this quote mentions, Mark Adler created the zran utility, which allows for the creation of indexes that can enable reading of DEFLATE-compressed data from the beginning of DEFLATE blocks. This capability would be incredibly useful for accessing scientific data archives that are typically written once, but read many times.
Mark Adler recently updated this utility and it would be fantastic to see an adaptation of zran added to zlib-ng as well.
The text was updated successfully, but these errors were encountered:
As discussed in the
zlib
FAQ, DEFATE-compressed data is not designed for random access:However, as this quote mentions, Mark Adler created the
zran
utility, which allows for the creation of indexes that can enable reading of DEFLATE-compressed data from the beginning of DEFLATE blocks. This capability would be incredibly useful for accessing scientific data archives that are typically written once, but read many times.Mark Adler recently updated this utility and it would be fantastic to see an adaptation of
zran
added tozlib-ng
as well.The text was updated successfully, but these errors were encountered: