[Ohrrpgce] SVN: teeemcee/10853 Implement .gz (gzip) file reading/writing

subversion at HamsterRepublic.com subversion at HamsterRepublic.com
Thu Nov 8 05:34:39 PST 2018


teeemcee
2018-11-08 05:34:39 -0800 (Thu, 08 Nov 2018)
751
Implement .gz (gzip) file reading/writing

gzip is a simple format, only a little more complex than the zlib stream format.
zlib contains functions for reading/writing gzip files, but I instead
implemented this much simpler API using the deflate/zlib implementation inside
LodePNG, to avoid a dependency on zlib. (LodePNG has functions for zlib streams
but not gzip.) Of course we could just use zlib on Unix.
Note that LodePNG's implementation is slower and doesn't compress as well.
If compression or decompression speed or compression ratio actually matter
strongly (eg for compressing .rpg lumps), gzip isn't the right format to use
anyway (e.g. brotli or zstd for highest speed at given ratio, lzma for high
compression)

Added tests to filetest.
---
U   wip/SConscript
U   wip/filetest.bas
A   wip/lib/lodepng_gzip.bi
U   wip/lib/lodepng_gzip.c
A   wip/lib/lodepng_gzip.h


More information about the Ohrrpgce mailing list