compress::flate: style, clean-up
Makefile: Also install compress::gzip
Signed-off-by: Johannes Maibaum <jmaibaum@gmail.com>
compress::gzip: regen iconv.ha w/out trailing space
Also add a tab at the beginning of each line so that we generate code
following the Hare style guide. Further, update .iconv/gen.ha:
fs::flags::* => fs::flag::*.
Signed-off-by: Johannes Maibaum <jmaibaum@gmail.com>
compress::zlib: separate test data from test code
This makes re-running .testdata/gen.ha a lot easier, and brings this
code in line with the ::gzip tests which have the same separation of
test logic and test data.
Signed-off-by: Johannes Maibaum <jmaibaum@gmail.com>
compress::flate: Move init_fixed back to library
@init fn init_fixed() was moved to flate/+test.ha in
9b47d8a113b2262c7527e19f9403fd7cb6451253, which broke inflating blocks
compressed using fixed Huffman codes outside of tests, i.e. for direct
usage of the flate module in other projects.
Signed-off-by: Johannes Maibaum <jmaibaum@gmail.com>
compress::{gzip,zlib}.testdata/gen.ha: bufio=>memio
Also fix fmt modifiers to correctly prefix upper case hex with 0.
Signed-off-by: Johannes Maibaum <jmaibaum@gmail.com>
compress::zlib: remove duplicate @test fn
Signed-off-by: Johannes Maibaum <jmaibaum@gmail.com>
*: remove full module name usage
encoding::gzip: remove full module name usage
They are not officially supported and may be removed in the future.
compress::*: remove test dependencies from non tests
compress::gzip: update for latest stdlib
Updated hare-compress to compile/run with the latest hare stdlib.
all: strio/bufio => memio
Correct FCHECK condition
Since buf[0] is a u8, using << 8 will turn it into 0.
Fix compilation with latest harec and stdlib
zlib: Move decompress test to +test
compress::deflate: Fix < 0 check on unsigned int
Signed-off-by: Lassi Pulkkinen <lassi@pulk.fi>
compress::deflate: Fix off-by-one size of counts array
The highest index of the array should be MAXBITS,
hence length = MAXBITS + 1.
Signed-off-by: Lassi Pulkkinen <lassi@pulk.fi>