93 Commits
Author SHA1 Message Date
Timofey Solomko 1ab2748a00 Fixed zero-length problem for big uncompressed blocks. 2017-02-26 14:51:20 +03:00
Timofey Solomko 743eead3ea Added fallback to uncompressed block in cases if it will be more size-efficient (according to size calculations). 2017-02-24 19:55:55 +03:00
Timofey Solomko 7b89374b12 Another fix for stats. 2017-02-24 19:51:26 +03:00
Timofey Solomko 84b7e9c4da Fixed some stats calculation problem. 2017-02-24 19:48:41 +03:00
Timofey Solomko 25d7459105 Added calculations of estimated sizes. 2017-02-24 19:48:24 +03:00
Timofey Solomko 394166443c Added stats counting. 2017-02-24 18:41:44 +03:00
Timofey Solomko c7d982c19b Added a check for HuffmanTree.code(…) returning empty array. 2017-02-18 22:20:47 +03:00
Timofey Solomko 9b33b81353 Added a lot of docs strings. 2017-02-18 22:16:37 +03:00
Timofey Solomko 19ef15119f Removed print statements. 2017-02-12 10:52:52 +03:00
Timofey Solomko 8f5f7f6b63 Fixed problem with not limiting max distance. 2017-02-11 20:48:17 +03:00
Timofey Solomko 01dd368e0e BLDCode.description is no longer public. 2017-02-09 08:15:38 +03:00
Timofey Solomko ee11cd7722 Added performance testing for deflate compression. 2017-02-08 23:24:21 +03:00
Timofey Solomko 24576d892a Added function which allows creation of uncompressed deflate blocks, which in its turn allows us to enable test5 for deflation. 2017-02-08 19:41:02 +03:00
Timofey Solomko b1100a7594 Added new function to BitToByteWriter which writes a number with specified amount of bits. 2017-02-08 19:34:07 +03:00
Timofey Solomko 0db34d6820 Added dictionary-tech with three-byte hashes, which also allows to enable deflate6 test (better speed). 2017-02-08 19:26:11 +03:00
Timofey Solomko cafa8422da One more fix for distance encoding. 2017-02-07 23:00:10 +03:00
Timofey Solomko d1343e4c35 Fixed a problem with last distance symbol. 2017-02-07 22:45:23 +03:00
Timofey Solomko f7b75188fa lengthEncode code replaced with modified old version. 2017-02-07 22:36:04 +03:00
Timofey Solomko 8241d945bc Corrected errors with writing extra bits for HuffmanCodes. 2017-02-07 22:35:19 +03:00
Timofey Solomko eb81146e2a lengthEncode replaced with version which doesn’t perform any compression, test now compares before and after comp/decomp. 2017-02-05 20:47:42 +03:00
Timofey Solomko ae61d2ba91 Added appropriate public API for deflate compression. 2017-02-05 19:16:06 +03:00
Timofey Solomko b2c7f64cfe Text fixes. 2017-02-04 15:07:38 +03:00
Timofey Solomko af0281d19f Completed static huffman encoding. 2017-02-04 00:00:15 +03:00
Timofey Solomko b57049cbb1 Added huffmanEncode function with first steps in huffman encoding (only literals for now). 2017-02-03 21:55:26 +03:00
Timofey Solomko 06527bb7f9 Fixed some edge cases. 2017-02-03 20:32:08 +03:00
Timofey Solomko a4610c7aea Added max distance check. 2017-02-03 20:08:40 +03:00
Timofey Solomko 249adf87f3 Fixed distance value. More readable output in test. 2017-02-03 20:06:10 +03:00
Timofey Solomko a5cd5e51fb Redone lengthEncode with the use on new enum (which is CustomStringConvertible). 2017-02-03 19:49:06 +03:00
Timofey Solomko a5601037b6 Final attempt to fix several problems in current implementation of lengthEncode. 2017-02-02 23:45:06 +03:00
Timofey Solomko 642e07614e Small refactor in deflate. 2017-01-31 22:56:33 +03:00
Timofey Solomko f57b1d5682 Added test for lengthEncode and some additional remarks for testing purposes. 2017-01-31 22:14:12 +03:00
Timofey Solomko 3285181c6a Added new function to Deflate which provides length-distance encoding. 2017-01-31 22:13:37 +03:00
Timofey Solomko 623999ef58 Small docs fixes. 2017-01-28 21:02:56 +03:00
Timofey Solomko d877adf962 Updated copyright year. 2017-01-05 23:09:53 +03:00
Timofey Solomko 8107eaca9a Renamed and expanded several DeflateErrors. 2016-12-25 22:38:24 +03:00
Timofey Solomko 962e9c0aba Several classes are now final. 2016-12-25 22:05:14 +03:00
Timofey Solomko c8a5813730 Removed append(contentsOf:) where possible and performed small cleanup. 2016-12-24 22:26:55 +03:00
Timofey Solomko dfe83f8297 Removed argument lable pointerData from internal deflate-related methods. 2016-12-24 20:00:43 +03:00
Timofey Solomko 04106bfa8a Some changes to make deflate/bzip2 faster. 2016-12-24 18:42:56 +03:00
Timofey Solomko 59cdfa3a19 out array now has proper doc string. 2016-12-15 23:37:36 +03:00
Timofey Solomko 443dcbe076 Rephrased docs for DeflateError.UnknownBlockType. 2016-12-15 23:25:08 +03:00
Timofey Solomko 66a4632dd0 findNextSymbol no longer returns optional. 2016-12-11 14:00:06 +03:00
Timofey Solomko effb1e8691 Uncompressed block now added to out a little bit more efficient. 2016-12-09 11:29:36 +03:00
Timofey Solomko 1f95237274 Adopted removal of alignedBytes() in other code. 2016-12-09 01:08:49 +03:00
Timofey Solomko 4db6e7ec44 Removed remains of huffmantable. 2016-12-05 19:47:25 +03:00
Timofey Solomko c4f54e8198 United two cycles through lengths array. Thus, there is no need for symbol property in HuffmanLength. Also added dots to the end of comments. 2016-12-04 22:25:19 +03:00
Timofey Solomko 6215d68aa5 tree property of HuffmanTree now stores only codes. findNextSymbol now returns Int instead of HuffmanLengths. 2016-12-04 19:58:41 +03:00
Timofey Solomko 875a015043 HuffmanTable renamed to HuffmanTree. Its properties are now private. 2016-12-04 19:49:53 +03:00
Timofey Solomko e93050260d Additionally simplified usage of findNextSymbol. 2016-12-04 19:28:57 +03:00
Timofey Solomko 91016942f0 Made changes so bzip2 now also works. 2016-12-04 19:25:28 +03:00