summaryrefslogtreecommitdiff
path: root/Tests/LibCompress
AgeCommit message (Collapse)Author
2023-01-10LibCompress: Port `DeflateCompressor` to `Core::Stream`Tim Schumacher
2023-01-10LibCompress: Port `GzipCompressor` to `Core::Stream`Tim Schumacher
2023-01-10LibCore: Rename InputBitStream.h to BitStream.hTim Schumacher
We won't just be defining readable streams here from now on, but also writable streams.
2023-01-03LibCompress: Rename `Compress::Zlib` to `Compress::ZlibDecompressor`Tim Schumacher
Because that's what it is, even if it mainly relies on `DeflateDecompressor` to do the heavy lifting.
2023-01-03Tests: Add a simple compression test for ZlibTim Schumacher
2022-12-15LibCore: Rename `MemoryStream` to `FixedMemoryStream`Tim Schumacher
This is to differentiate between the upcoming `AllocatingMemoryStream`, which automatically allocates memory as needed instead of operating on a static memory area.
2022-12-12LibCompress: Port `DeflateDecompressor` to `Core::Stream`Tim Schumacher
2022-12-12LibCore: Rename `Stream::read_all` to `read_until_eof`Tim Schumacher
This generally seems like a better name, especially if we somehow also need a better name for "read the entire buffer, but not the entire file" somewhere down the line.
2022-12-10LibCompress: Port GzipDecompressor to `Core::Stream`Tim Schumacher
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-10-11LibCompress: Brotli support metadata of skip_length=0Tommy Murphy
The relevant RFC section from https://www.rfc-editor.org/rfc/rfc7932#section-9.2 MSKIPBYTES * 8 bits: MSKIPLEN - 1, where MSKIPLEN is the number of metadata bytes; this field is only present if MSKIPBYTES is positive; otherwise, MSKIPLEN is 0 (if MSKIPBYTES is greater than 1, and the last byte is all zeros, then the stream should be rejected as invalid) So when skip_bytes is zero we need to break and re-align bytes. Added the relevant test case that demonstrates this from: https://github.com/google/brotli/blob/master/tests/testdata/x.compressed
2022-10-10Everywhere: Replace uses of __serenity__ with AK_OS_SERENITYAndrew Kaster
Now that we have OS macros for essentially every supported OS, let's try to use them everywhere.
2022-09-17LibCompress+Tests: Demonstrate and fix faulty metadata lengthBen Wiederhake
The test-case is heavily inspired by: https://github.com/google/brotli/blob/master/tests/testdata/x.compressed.01 Or in words: A metadata meta-block containing `Y` (which should be ignored), and then the actual data (a single `Z`). The bug used to skip one metadata byte too few, and thus read garbage.
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-05-21LibCompress: Implement Brotli decompressorMichiel Visser
This implements the BrotliDecompressionStream, which is a Core::Stream that can decompress another Core::Stream.
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2021-09-06Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safeAli Mohammad Pur
2021-09-02Tests: Remove all file(GLOB) from CMakeLists in TestsAndrew Kaster
Using a file(GLOB) to find all the test files in a directory is an easy hack to get things started, but has some drawbacks. Namely, if you add a test, it won't be found again without re-running CMake. `ninja` seems to do this automatically, but it would be nice to one day stop seeing it rechecking our globbed directories.
2021-05-27Tests: Use ByteBuffer::create_zeroed in TestDeflate instead of memsetAndrew Kaster
The round trip compress test wants the first half of the byte buffer to be filled with random data, and the second half to be all zeroes. The strategy of using memset on ByteBuffer::offset_pointer confuses __builtin_memset_chk when building with -fsanitize=undefined. It thinks that the buffer is using inline capacity when we can prove to ourselves pretty easily that it's not. To avoid this, just create the buffer zeroed to start, and then fill the first half with the random data.
2021-05-06Tests: Move LibCompress tests to Tests/LibCompressBrian Gianforcaro