Commit Graph
1507 Commits
Author SHA1 Message Date
Timofey Solomko f307a7fb0b [BZip2] Improve handling of truncated inputs during decompression 2026-02-23 18:08:27 +08:00
Timofey Solomko ad73d82367 [BZip2] Slightly rewrite Huffman+RUNA/B+MTF decoding
This piece of the code is now more logical, with less branching, and mirrors encoding counterpart.
2026-02-23 18:08:26 +08:00
Timofey Solomko a0c64f7f9c [Deflate] Optimize creation of uncompressed blocks 2026-02-23 18:08:26 +08:00
Timofey Solomko 51734eb8d3 [swcomp] Remove empty warmupIteration function from comp-ratio benchmarks
These functions weren't called anyway since 5e8f568f64 commit where Benchmark protocol requirement for this function acquired Double return type. In any event, skipping of warmup iteration is better controlled by the corresponding option of "benchmark run" command.
2026-02-23 18:08:26 +08:00
Timofey Solomko 3686067e54 [LZMA] Remove LZMARangeDecoder.isCorrupted property
According to LZMA specification this property is ignored by the reference implementation. In addition, specification suggests that other LZMA decoders should also ignore it. We weren't using this property for anything anyway, so its removal does not really change anything, except for better compliance with LZMA specification.

In addition, range decoder initialization error is now thrown in accordance with reference implementation.
2026-02-23 18:08:26 +08:00
Timofey Solomko 609eb29791 [BZip2] Change a couple of guard/if-checks to assertions 2026-02-23 18:08:26 +08:00
Timofey Solomko 1e7154474b [BZip2] Use better versions of bit writer functions
First, write(unsignedNumber:) is better than write(number:) when the argument is already UInt, since it does one fewer precondition check and does not do additional integer conversion. Secondly, using write(number:) to write one bit was very inefficient.
2026-02-23 18:08:25 +08:00
Timofey Solomko 7af76764d7 [BZip2] Use UInt8 arrays instead of Data 2026-02-23 18:08:25 +08:00
Timofey Solomko bff411d511 [BZip2] Improve encoding performance of code lengths deltas 2026-02-23 18:08:25 +08:00
Timofey Solomko 273b6ed9e9 Remove redundant imports 2026-02-18 12:21:57 +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 d76351caa0 [swcomp] Update benchmark run command to use new format 2026-02-12 21:44:42 +08:00
Timofey Solomko 52961ea60d [swcomp] Update benchmark show command to use new format
This allowed to rewrite implementation in a much clearer way. One user-visible change, however, is that NEW/BASE is now always printed with an index even if there is only one (implementation complexity to accommodate empty index is not worth it).
2026-02-12 21:44:42 +08:00
Timofey Solomko 515c11fd0e [swcomp] Support new format in benchmark remove-run command 2026-02-12 21:44:42 +08:00
Timofey Solomko 8847fe92ce [swcomp] SaveFile.load now auto-converts from old format 2026-02-12 21:44:41 +08:00
Timofey Solomko 4ec437e912 [swcomp] Add benchmark convert command
This command converts save file from old format to the new one.
2026-02-12 21:44:35 +08:00
Timofey Solomko 20d33b0966 [swcomp] Add a new benchmark save file format
Ultimately, it turned out that the approach of the old save file format of separating runs metadatas and results only leads to super complicated code. Unfortunately, it didn't help with append-updates to save files (they are still loaded fully, their content is modified in memory, and the actual file is then overwritten).
2026-02-12 21:44:35 +08:00
Timofey Solomko 98b5ee3610 [swcomp] Save results file JSON with keys sorted
This ensures a more stable layout of JSON fields between updates to the same file.
2026-02-12 21:44:35 +08:00
Timofey Solomko 3f5694aeee [swcomp] Rename SaveFile to OldSaveFile 2026-02-12 21:44:35 +08:00
Timofey Solomko b2b4e18a58 [swcomp] Remove redundant import statements 2026-02-12 21:44:30 +08:00
Timofey Solomko 871b5dbe03 [swcomp] Add benchmark remove-run subcommand 2026-02-12 21:44:29 +08:00
Timofey Solomko 5618fea2ee [swcomp] Add --self-compare option to benchmark show command
This option allows to compare a run with other runs in the same file.
2026-02-11 21:56:37 +08:00
Timofey Solomko c05b37d324 [swcomp] Add --metadata-only option to benchmark show command
With this option only metadata is printed for the benchmark runs saved in the file.
2026-02-11 19:15:20 +08:00
Timofey Solomko 6b701e0b2f [swcomp] Add --print-uuid option to benchmark show command
This option enables printing of internal UUIDs of benchmark runs saved in the file.
2026-02-11 19:14:26 +08:00
Timofey Solomko e236b502b7 [swcomp] Improve benchmark show output for multi-way comparsions 2026-02-11 19:03:48 +08:00
Timofey Solomko 3537e0ada1 [swcomp] Save raw benchmark data for posterity 2026-02-11 19:03:14 +08:00
Timofey Solomko 5e8f568f64 [swcomp] Save and show benchmark warmup iteration 2026-02-11 19:03:14 +08:00
Timofey Solomko 5a0eb8187a [XZ] Rename a file for consistency 2026-02-11 19:03:14 +08:00
Timofey Solomko 5d27f1b9b9 [swcomp] Print benchmark metadatas in normal order 2026-02-11 19:03:09 +08:00
Timofey Solomko d8c4527c89 [BZip2] Slightly optimize MTF transform of selectors during compression
It can be statically proven that the output of MTF transform lies within a certain range, so a guard check can be replaced with an assertion.
2026-02-11 17:21:52 +08:00
Timofey Solomko e7c4c13543 [BZip2] Code comments clarification 2026-02-11 17:21:48 +08:00
Timofey Solomko 33341b690b [LZ4] Code comments grammar and wording improvements 2026-02-03 01:17:21 +08:00
Timofey Solomko 1566b49ce3 [7-Zip][ZIP] Remove support for CocoaPods optional dependencies 2026-02-03 01:15:33 +08:00
Timofey Solomko ea9aaccfb9 Update copyright year to 2026 2026-01-31 15:30:24 +08:00
Timofey Solomko fa4af5803a [TAR] Remove compatibility functions for FileHandle 2024-04-21 17:18:53 +03:00
Timofey Solomko 891848f939 [swcomp] Remove redundant compiler check 2024-04-21 14:05:16 +03:00
Timofey Solomko 687517cfd5 Prepare for 4.8.6 release 2024-04-21 13:13:02 +03:00
Timofey Solomko eabfe947ea Add stupid PrivacyInfo thing 2024-04-21 11:43:33 +03:00
Timofey Solomko ed66991cbd Update copyright year to 2024 2024-01-11 16:57:04 +03:00
Timofey Solomko 6a6e75d752 [docs] Fix an error in documentation for TarEntryInfo.deviceMinorNumber 2023-09-20 11:45:27 +03:00
Timofey Solomko 1e7393dc54 Prepare for 4.8.5 release 2023-02-19 17:25:03 +02:00
Timofey Solomko c85adf3d73 [LZMA] Init range decoder's code with only one byte reader call 2023-02-19 16:51:03 +02:00
Timofey Solomko ae99c943f6 [LZMA] Fix incorrect check for empty out window
This was caused by incorrectly assuming that out window (dictionary) always starts at 0 index. This is not correct in the case of LZMA2 where dictionary may have been reset, but the out window is technically not an empty array.
2023-02-19 16:49:14 +02:00
Timofey Solomko 43132fc39d Update copyright year to 2023 2023-02-07 15:31:45 +02:00
Timofey Solomko cbb34a17ce Prepare for 4.8.4 release 2022-12-20 22:09:04 +03:00
Timofey Solomko c1ecadbcb7 Update some code comments 2022-12-17 19:02:19 +03:00
Timofey Solomko db48b07ec2 [TAR] TarReader now always returns nil after reaching EOF
Previosuly, repeated calls of read() or process() after reaching EOF would result in DataError.truncated being thrown. This behavior caused issues when there was no EOF marker in the TAR container.
2022-12-17 19:02:19 +03:00
Timofey Solomko b1fe47fdbb [BZip2] Fix incorrect BWT pointer in compression 2022-12-15 23:25:21 +03:00
Timofey Solomko c7f4665394 Prepare for 4.8.3 release 2022-10-22 20:06:24 +03:00