32 Commits

Author SHA1 Message Date
Timofey Solomko b743b0b7ed [Deflate] Optimize decoding of code lengths for dynamic trees 2026-02-26 00:53:17 +08:00
Timofey Solomko a0c64f7f9c [Deflate] Optimize creation of uncompressed blocks 2026-02-23 18:08:26 +08:00
Timofey Solomko 5b5b20f582 [Huffman] Remove codes argument label from EncodingTree.init 2026-02-18 00:12:55 +08:00
Timofey Solomko ce1736a2b0 [Huffman] Add HuffmanCodes typealias for clarity 2026-02-18 00:10:29 +08:00
Timofey Solomko ea9aaccfb9 Update copyright year to 2026 2026-01-31 15:30:24 +08:00
Timofey Solomko ed66991cbd Update copyright year to 2024 2024-01-11 16:57:04 +03:00
Timofey Solomko 43132fc39d Update copyright year to 2023 2023-02-07 15:31:45 +02:00
Timofey Solomko 2b47fb7f49 [Deflate] Replace computation of static tree codes from lenghts with precomputed codes 2022-05-21 23:00:36 +03:00
Timofey Solomko 79295db930 Update copyright year to 2022 2022-01-08 15:02:59 +03:00
Timofey Solomko a47431f86d [Deflate] Don't use match index as a cycling index
This was the cause of incorrect results in some rare cases.
2021-10-24 15:03:53 +03:00
Timofey Solomko f64c5264f8 [LZ4] Remove extra TODOs 2021-10-22 22:43:50 +03:00
Timofey Solomko de7864c6db [Deflate] Replace crc32 of a match with bytes contacenated into UInt32
Previously, we were using crc32 to identify matches when doing compression. This not only was an overkill computationally (the new version has boosted the compression speed), but it could also lead to incorrect results in some rare cases (potentially, only theoretical situtations) due to collisions of crc32 algorithm.
2021-10-21 22:30:23 +03:00
Timofey Solomko da8f4f7f5c [Deflate] Rename some variables in lengthEncode 2021-10-18 18:35:06 +03:00
Timofey Solomko 268aaaa356 [Deflate] Use start/endIndex instead of count property of data input 2021-10-18 18:31:40 +03:00
Timofey Solomko 113972bcce [Deflate] Reduce nesting in lengthEncode
This should be a purely refactoring change with no effect on performance or functionality.
2021-10-18 18:30:15 +03:00
Timofey Solomko e83f23effa Update copyright year to 2021 2021-01-11 11:20:57 +02:00
Timofey Solomko 31ec1f1553 Update copyright year to 2020 2020-01-01 19:06:33 +03:00
Timofey Solomko 35a93815b3 Replace usage of deprecated index(...) functions with the new ones 2019-05-01 19:39:41 +03:00
Timofey Solomko 04f64bcb72 Rename Encoding/DecodingHuffmanTree to just Encoding/DecodingTree 2019-03-12 22:31:35 +03:00
Timofey Solomko 142fd44dd2 Remove old CodeLength initializer from Encoding(Huffman)Tree 2019-03-12 22:31:24 +03:00
Timofey Solomko ce47019097 Update copyright year to 2019 2019-01-02 23:15:43 +03:00
Timofey Solomko 1c5ca3bbe5 Swiflinted before 4.4.0 2018-08-07 21:18:39 +03:00
Timofey Solomko e714dc308b Updated copyright year to 2018 2018-01-03 19:44:18 +03:00
Timofey Solomko e986561487 Replace Int() conversions with toInt() functions 2018-01-03 19:22:15 +03:00
Timofey Solomko bb39c4016c Replace SWCompression.BitWriter with BitByteData's one 2018-01-03 19:22:15 +03:00
Timofey Solomko cef8ab12a2 Rename BitWriter.finish() to align 2018-01-03 19:22:13 +03:00
Timofey Solomko 15c06843b1 Replace BitWriter.buffer with Data 2018-01-03 19:22:13 +03:00
Timofey Solomko d7bb712031 Return Data instead of bytes array in Deflate.encodeHuffmanBlock 2017-12-24 14:49:32 +03:00
Timofey Solomko d63d2977fb Only reverse bit order of codes in EncHuffmanTree if necessary
And it is necessary only for Deflate. This will allow us to remove bitOrder argument of BitWriter.write, which has very unclear semantics
2017-12-21 15:24:54 +03:00
Timofey Solomko dcfde952f2 Don't convert Data to UInt8 array in Deflate compression 2017-11-22 22:15:02 +03:00
Timofey Solomko 8aced32379 Extract function for calculating Deflate's static huffman block size 2017-11-19 20:05:45 +03:00
Timofey Solomko 843896edcf Move source code files into subfolders 2017-10-06 23:10:01 +03:00