1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 20:35:06 +00:00
Commit graph

13 commits

Author SHA1 Message Date
asynts
e2e2e782d4 Deflate: Fix deadly typo. 2020-09-06 12:54:45 +02:00
asynts
f9ba037674 LibCompress: Replace ASSERT_NOT_REACHED with set_fatal_error.
We shouldn't assert that the input file is valid.
2020-09-06 12:54:45 +02:00
asynts
b68a873067 AK: Move memory streams into their own header. 2020-09-01 17:25:26 +02:00
asynts
9ce4475907 Streams: Distinguish recoverable and fatal errors. 2020-09-01 17:25:26 +02:00
asynts
1c8312fa50 LibCompress: Fix a bug when wrapping around the buffer. 2020-08-31 23:04:55 +02:00
asynts
0ebf56efb0 LibCompress: Add support for dynamic deflate blocks. 2020-08-31 23:04:55 +02:00
asynts
d5c5507a0e LibCompress: Deflate: Don't assert that the codes are valid. 2020-08-31 23:04:55 +02:00
asynts
c4799576ea LibCompess: Add missing state update in DeflateDecompressor::read. 2020-08-31 23:04:55 +02:00
asynts
ef7bec6a3b LibCompress: CanonicalCode: Don't leave unused code uninitialized. 2020-08-31 23:04:55 +02:00
asynts
7c53f14bbc LibCompress: Implement DEFLATE properly.
Now we have an actual stream implementation that can read arbitrary
(dynamic codes aren't supported yet) deflate encoded data. Even if
the blocks are really large.

And all of that happens with a single buffer of 32KiB. DEFLATE is
amazing!
2020-08-26 21:07:53 +02:00
asynts
8bbb7e25e6 LibCompress: Turn the DEFLATE implementation into a stream.
Previously, the implementation would produce one Vector<u8> which
would contain the whole decompressed data. That can be a lot and
even exhaust memory.

With these changes it is still necessary to store the whole input data
in one piece (I am working on this next,) but the output can be read
block by block. (That's not optimal either because blocks can be
arbitrarily large, but it's good for now.)
2020-08-20 16:28:31 +02:00
Ben Wiederhake
7abd9c81c6 LibCompress: Mark compilation-unit-only functions as static
This enables a nice warning in case a function becomes dead code.
2020-08-12 20:40:59 +02:00
stelar7
98e18d7339 LibCompress: Add LibCompress
For now this only contains DEFLATE, and a very simple Zlib
Eventually GZip, etc. can go here as well.
2020-08-04 11:27:07 +02:00