Overview
Comment: | OFZIPArchive: Handle files spanning multiple parts |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d6f5e2abc50e14c1a79ca456757bbc64 |
User & Date: | js on 2023-07-25 21:21:02 |
Other Links: | manifest | tags |
Context
2023-07-25
| ||
21:35 | Make GCC happy again check-in: a1ea38be5b user: js tags: trunk | |
21:21 | OFZIPArchive: Handle files spanning multiple parts check-in: d6f5e2abc5 user: js tags: trunk | |
2023-07-24
| ||
18:40 | OFZIPArchive: Restrict split archives to mode @"r" check-in: 79b88573e0 user: js tags: trunk | |
Changes
Modified src/OFInflate64Stream.h from [95b4831491] to [f13138a788].
︙ | |||
66 67 68 69 70 71 72 73 74 75 76 77 78 79 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | + + + + + + + + | int state; uint16_t value, length, distance, extraBits; } huffman; } _context; bool _inLastBlock, _atEndOfStream; } /** * @brief The underlying stream of the inflate stream. * * Setting this can be useful if the the data to be inflated is coming from * multiple streams, such as split across multiple files. */ @property (retain, nonatomic) OFStream *underlyingStream; /** * @brief Creates a new OFInflate64Stream with the specified underlying stream. * * @param stream The underlying stream to which compressed data is written or * from which compressed data is read * @return A new, autoreleased OFInflate64Stream */ |
︙ |
Modified src/OFInflateStream.h from [4379fb100c] to [1320fce7c5].
︙ | |||
66 67 68 69 70 71 72 73 74 75 76 77 78 79 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | + + + + + + + + | int state; uint16_t value, length, distance, extraBits; } huffman; } _context; bool _inLastBlock, _atEndOfStream; } /** * @brief The underlying stream of the inflate stream. * * Setting this can be useful if the the data to be inflated is coming from * multiple streams, such as split across multiple files. */ @property (retain, nonatomic) OFStream *underlyingStream; /** * @brief Creates a new OFInflateStream with the specified underlying stream. * * @param stream The underlying stream to which compressed data is written or * from which compressed data is read * @return A new, autoreleased OFInflateStream */ |
︙ |
Modified src/OFInflateStream.m from [2767dcbcf2] to [7aafb9081b].
︙ | |||
96 97 98 99 100 101 102 103 104 105 106 107 108 109 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | + + | #endif static const uint8_t codeLengthsOrder[19] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; static OFHuffmanTree fixedLitLenTree, fixedDistTree; @implementation OFInflateStream @synthesize underlyingStream = _stream; static OF_INLINE bool tryReadBits(OFInflateStream *stream, uint16_t *bits, uint8_t count) { uint16_t ret = stream->_savedBits; OFAssert(stream->_savedBitsLength < count); |
︙ |
Modified src/OFZIPArchive.h from [11e4bf42cf] to [a8992114f0].
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | - + - + - - + + - - + + + | @optional /** * @brief A callback that is called when an @ref OFZIPArchive wants to read a * different archive part. * * @param archive The archive that wants to read another part * @param partNumber The number of the part the archive wants to read |
︙ |
Modified src/OFZIPArchive.m from [d64ccad589] to [e0e6f86ab3].
︙ | |||
81 82 83 84 85 86 87 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | + - + | - (bool)matchesEntry: (OFZIPArchiveEntry *)entry; @end OF_DIRECT_MEMBERS @interface OFZIPArchiveFileReadStream: OFStream { OFZIPArchive *_archive; OFZIPArchiveEntryCompressionMethod _compressionMethod; |
︙ | |||
157 158 159 160 161 162 163 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | - + + - + | seekOrThrowInvalidFormat(OFZIPArchive *archive, const uint32_t *diskNumber, OFStreamOffset offset, OFSeekWhence whence) { if (diskNumber != NULL && *diskNumber != archive->_diskNumber) { OFStream *oldStream; OFSeekableStream *stream; |
︙ | |||
304 305 306 307 308 309 310 | 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | - + - + | break; } } while (--offset >= -65557); if (!valid) @throw [OFInvalidFormatException exception]; |
︙ | |||
339 340 341 342 343 344 345 | 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 | - + + + + | /* * FIXME: Handle number of the disk containing ZIP64 end of * central directory record. */ diskNumber = [_stream readLittleEndianInt32]; offset64 = [_stream readLittleEndianInt64]; |
︙ | |||
768 769 770 771 772 773 774 | 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 | - + - + - + - + - + - + - + - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | stream: (OFStream *)stream entry: (OFZIPArchiveEntry *)entry { self = [super init]; @try { _archive = [archive retain]; |
︙ | |||
880 881 882 883 884 885 886 | 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 | - + - - - | { return ((id <OFReadyForReadingObserving>)_decompressedStream) .fileDescriptorForReading; } - (void)close { |
︙ |
Modified utils/ofarc/ZIPArchive.m from [1213ad1e65] to [5f0ed89edf].
︙ | |||
120 121 122 123 124 125 126 | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | - + - + | [_archive release]; [super dealloc]; } - (OFSeekableStream *)archive: (OFZIPArchive *)archive wantsPartNumbered: (unsigned int)partNumber |
︙ |