113 Commits
Author SHA1 Message Date
Timofey Solomko 8c58347303 Preparations for 1.2.0. 2016-12-05 19:51:00 +03:00
Timofey Solomko 4c310b9ce8 Removed remains of huffmantable. 2016-12-05 19:47:25 +03:00
Timofey Solomko 95f4a2fa75 Swiftlinted. 2016-12-05 19:46:09 +03:00
Timofey Solomko c02c40fdb0 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 f98b96dd7b Removed rewind function. 2016-12-04 20:25:11 +03:00
Timofey Solomko c09d108e30 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 892b2c9ccc HuffmanTable renamed to HuffmanTree. Its properties are now private. 2016-12-04 19:49:53 +03:00
Timofey Solomko 10035700a7 Removed lengths property of HuffmanTable. 2016-12-04 19:42:34 +03:00
Timofey Solomko 3b4f000606 Removed HuffmanLength.symbol. Renamed HuffmanLength.reversedSymbol into symbol. 2016-12-04 19:38:43 +03:00
Timofey Solomko 4eda2568c5 reversedTree renamed to tree. 2016-12-04 19:32:19 +03:00
Timofey Solomko 164df17935 Removed unused tree structure in HuffmanTable. 2016-12-04 19:31:16 +03:00
Timofey Solomko 0b839f4d2f Additionally simplified usage of findNextSymbol. 2016-12-04 19:28:57 +03:00
Timofey Solomko fd8786a080 Made changes so bzip2 now also works. 2016-12-04 19:25:28 +03:00
Timofey Solomko ecc626abf5 Simplified findNextSymbol usage and added a new way of finding a symbol (with tree) for .reversed bitOrders. 2016-12-04 15:55:34 +03:00
Timofey Solomko 927da2d6ae Finally, found a way to create correct huffman trees. Also removed remains of last attempts. 2016-12-04 15:24:09 +03:00
Timofey Solomko 4ae8dad3d4 Another attempt of tree creation. Note that first leafs in a tree a nils. 2016-12-04 13:29:36 +03:00
Timofey Solomko 93f3509c97 Implemented findnextsymbol with tree structure. It seems to not work properly. 2016-12-03 12:08:14 +03:00
Timofey Solomko 34ab6a4eb7 Added creation of tree-like structure for Huffman tables. 2016-12-02 22:01:49 +03:00
Timofey Solomko 206f3148ec The real job is now done only with data with pointer objects so there is no need for startPoint property of serviceInfos. 2016-11-26 15:40:40 +03:00
Timofey Solomko 9d099ec120 Added method which gets one byte from data with pointer. 2016-11-26 15:39:20 +03:00
Timofey Solomko 6938cad386 Preparations for 1.1.2. 2016-11-22 23:05:58 +03:00
Timofey Solomko 05c6a12e57 Fixed mtime problem in gzip tests. 2016-11-21 21:44:09 +03:00
Timofey Solomko 2ae6a7b252 Added new way to read bytes and used it in deflate uncompressed blocks. 2016-11-21 20:17:27 +03:00
Timofey Solomko 9123b24e85 ServiceInfos of Gzip and Zlib are now Equatable. 2016-11-21 19:23:27 +03:00
Timofey Solomko e2fbf3da9f Fixed a problem with unnecessary skipping of bits (causing nlength and length problem). 2016-11-20 23:27:22 +03:00
Timofey Solomko df1ed2f685 Preparations for 1.1.1. 2016-11-20 19:10:52 +03:00
Timofey Solomko 26ce09325d Moved common swift files so swift package manager won’t complain. 2016-11-20 17:56:09 +03:00
Timofey Solomko 6dfa85af83 Preparations for 1.1.0. 2016-11-19 20:44:27 +03:00
Timofey Solomko 789a863798 Added docs for Bzip2. 2016-11-19 20:24:14 +03:00
Timofey Solomko 170b92a7d7 Small performance improvement in DataWithPointer.bits. Also disabled bzip2_test7. 2016-11-19 20:11:57 +03:00
Timofey Solomko d795e208e3 Increased performance of deflate when compressed file had a lot of repeated bytes. 2016-11-19 18:29:42 +03:00
Timofey Solomko 62f187469d Fixed compilation-overflow error on some architectures. 2016-11-19 15:22:28 +03:00
Timofey Solomko 97aab89d0f Reorganized project structure. 2016-11-19 15:21:44 +03:00
Timofey Solomko e3605e676e Removed unnecessary bitShift aligning. 2016-11-19 13:50:57 +03:00
Timofey Solomko 845a32575d Added more extension functions for integer type conversions. 2016-11-19 13:47:02 +03:00
Timofey Solomko 2ea5c0feba Swiftlinted. 2016-11-19 13:39:04 +03:00
Timofey Solomko 748d3590c6 During decoding only uint8 arrays are now used for storing intermediate results (no Data — no memory problems). 2016-11-16 20:12:37 +03:00
Timofey Solomko fb2ec28f1a Fixed memory problems in BZip2. 2016-11-15 23:45:38 +03:00
Timofey Solomko ec72622a86 DataWithPointer no longer stores input data. 2016-11-15 23:45:04 +03:00
Timofey Solomko 615e8a1ff4 Added new enum for specifying bit order. United DataWithPointer and DataWithStraightPointer. 2016-11-15 22:32:36 +03:00
Timofey Solomko 65b1fe5191 Fixed several mistakes in bzip2. Now it passes all tests. 2016-11-15 00:01:03 +03:00
Timofey Solomko 1a6e617070 Added support for optional specification of straight bit order to findNextSymbol and convertToInt. 2016-11-14 23:59:02 +03:00
Timofey Solomko a34acd729c Bzip2 now uses new DataWithStraightPointer. 2016-11-14 23:18:22 +03:00
Timofey Solomko 52fd141015 Added parsing magic number of bzip2 archives. 2016-11-14 23:17:42 +03:00
Timofey Solomko 5e03f210e1 Added new DataWithPointer subclass (DataWithStraightPointer) which supports right-to-left bit order (used in bzip2). 2016-11-14 23:17:12 +03:00
Timofey Solomko d221ecf71d Copyright updates. 2016-11-13 21:16:04 +03:00
Timofey Solomko b933e936c0 Completed implementation of BZip2. 2016-11-13 21:06:57 +03:00
Timofey Solomko 729d9e222f Implementation of BZip2 reached bwt_reverse. 2016-11-13 20:30:45 +03:00
Timofey Solomko 8228ffb56d Added reversed argument back to findNextSymbol function. 2016-11-13 20:30:13 +03:00
Timofey Solomko 4bc6fb22d7 Added new convenience function to DataWithPointer which returns int number directly without conversion of uint8 array. 2016-11-13 19:30:36 +03:00