Commit Graph
919 Commits
Author SHA1 Message Date
Timofey Solomko bb45735132 Merge BurrowsWheeler.reverse and transofrm functions
The latter was used only for reverse transformation despite its name.
2018-01-07 20:09:34 +03:00
Timofey Solomko b9440aac9f Rework inverse BWT by removing sorting stage
This change has a significant impact on performance in a good way.
2018-01-07 15:16:18 +03:00
Timofey Solomko 2be06c8c0a Use ByteReader in all ZIP-related code
We can do this since we don't have asynchronous concerns anymore.
2018-01-07 15:12:59 +03:00
Timofey Solomko 536b5dcb49 Extract reverse local function of HuffmanTrees' inits as Int extension 2018-01-07 15:12:59 +03:00
Timofey Solomko 1dbc64a615 Remove switch from BZip2.BlockSize.headerByte 2018-01-07 15:12:59 +03:00
Timofey Solomko 7a09d5fde8 Preallocate bytes arrays in BZip2 2018-01-07 15:12:54 +03:00
Timofey Solomko b035d910a0 Rewrite BZip2.BlockSize.headerByte() as computed properties 2018-01-05 15:03:47 +03:00
Timofey Solomko 9f4884adc8 Refactor bzip2 block size parsing 2018-01-03 23:41:20 +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 d2d74d52b9 Remove unused extensions 2018-01-03 19:22:15 +03:00
Timofey Solomko c8d92e56d3 Replace BitReader and ByteReader with BitByteData's implementations 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 20ab480737 Complete renaming of DataWithPointer to ByteReader
This includes renaming pointerData variables to byteReader as well as renaming of files with extensions to ByteReader.
2018-01-03 19:22:14 +03:00
Timofey Solomko 1293cf15a0 Make BitReader.bitMask completely private 2018-01-03 19:22:14 +03:00
Timofey Solomko 22bd529b3c Change return type of BitReader.bit() to UInt8 2018-01-03 19:22:13 +03:00
Timofey Solomko dcf18c73d6 Rename ByteReader.isAtTheEnd to isFinished 2018-01-03 19:22:13 +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 b9eeb1bc7c Rename ByteReader.index to offset 2018-01-03 19:22:13 +03:00
Timofey Solomko 3751e25c4f Rename DataWithPointer to ByteReader
This and following commits should ease switch to BitByteData usage.
2018-01-03 19:22:13 +03:00
Timofey Solomko 6b0dd666ce Several modifications to xcode projects
Organization name set to "Timofey Solomko"; reset some settings to its default values; remove separate test project and workspace by merging them into main project; move plist files inside xcode project; use project-wide settings as much as possible; set project version 50 (total amount of releases on github) and CFBundleShortVersion to 4.0.1; versions in xcode project are now managed by agvtool: project version is increased by 1 whenever there is a new release, CFBundleShortVersion will continue to be semantically versioned; remove some unused settings; remove header file and empty build phases.
2018-01-03 19:21:14 +03:00
Timofey Solomko e05f917210 Improve compile time 2017-12-24 14:57:35 +03:00
Timofey Solomko 13d411e47c Optimise zip's needsUtf8 function 2017-12-24 14:57:34 +03:00
Timofey Solomko d7bb712031 Return Data instead of bytes array in Deflate.encodeHuffmanBlock 2017-12-24 14:49:32 +03:00
Timofey Solomko cce4d35ab7 Remove bitOrder argument from BitWriter.write(number:bitCount:) 2017-12-21 15:26:00 +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 07d9d41db2 Remove BitReader and DWP initialisers from byte array 2017-12-05 22:21:52 +03:00
Timofey Solomko cd9bd4eec4 Remove DWP.previousByte 2017-12-05 22:21:32 +03:00
Timofey Solomko c090d37c43 Set versions to 4.0.2-dev 2017-11-27 21:33:30 +03:00
Timofey Solomko b471e66106 Prepare for 4.0.1 2017-11-25 18:43:39 +03:00
Timofey Solomko 5e46c5837d Swiftlint autocorrect 2017-11-25 18:39:27 +03:00
Timofey Solomko 225af08da0 Fix uint8 overflow crash in 7z
It was happening when number of files with empty stream was greater than 255.
2017-11-24 00:10:22 +03:00
Timofey Solomko 60051dd193 Add commands to swcomp which can do performance tests 2017-11-23 23:33:55 +03:00
Timofey Solomko 6f88a765a8 Check comp size after reading compressed data and simplify filters-apply code 2017-11-23 19:38:46 +03:00
Timofey Solomko a447e6adcf Don't check unicodeness of zip strings if language encoding flags is set 2017-11-22 23:04:21 +03:00
Timofey Solomko e4447ca86f Increase version 2017-11-22 22:57:25 +03:00
Timofey Solomko 3b0e3c5d74 Mark several extension functions as inline-always 2017-11-22 22:25:18 +03:00
Timofey Solomko d9954f4791 Use new toArray function in DWP.bytes 2017-11-22 22:24:45 +03:00
Timofey Solomko 1fa558f1a6 Add toArray extension function with count argument 2017-11-22 22:24:26 +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 b9cebf13e9 Remove dwp functions with count argument 2017-11-22 22:08:02 +03:00
Timofey Solomko 21a32f1d5a Add no-args uint functions to DWP and BitReader
Tests shows that these functions are faster than functions with arguments.
2017-11-22 20:57:22 +03:00
Timofey Solomko 7c6d6d22ff Replace UInt extensions with one extension to UnsignedInteger 2017-11-22 20:56:28 +03:00
Timofey Solomko 98fd2e4d1e Remove reverseBytes function and use built-in byteSwapped property instead 2017-11-22 20:55:17 +03:00
Timofey Solomko 0826ccc5ef Use smaller uint dwp functions where possible 2017-11-22 00:06:39 +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 9da406fc53 Small improvement to EncHuffTree.code function 2017-11-19 12:47:46 +03:00
Timofey Solomko e8064ae12b Prepare for 4.0.0 2017-11-18 13:31:10 +03:00
Timofey Solomko 36b4654521 Correct doc string for TarError.wrongField 2017-11-18 11:08:52 +03:00