Differences From Artifact [9ece715a6e]:
- File
src/OFGZIPStream.h
— part of check-in
[f56a50ee50]
at
2017-06-10 10:00:12
on branch trunk
— Rename OFDeflateStream back to OFInflateStream
There is not much point in having a bi-directional stream for Deflate
compression / decompression. (user: js, size: 2389) [annotate] [blame] [check-ins using]
To Artifact [5bd0cee2bc]:
- File src/OFGZIPStream.h — part of check-in [319709fff1] at 2017-09-26 22:01:38 on branch 0.90 — Many nullability fixes (user: js, size: 2991) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 | #import "OFStream.h" #import "OFDate.h" @class OFInflateStream; OF_ASSUME_NONNULL_BEGIN @interface OFGZIPStream: OFStream { OFStream *_stream; | > > > > > > | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #import "OFStream.h" #import "OFDate.h" @class OFInflateStream; OF_ASSUME_NONNULL_BEGIN /*! * @class OFGZIPStream OFGZIPStream.h ObjFW/OFGZIPStream.h * * @brief A class that handles GZIP compression and decompression transparently * for an underlying stream. */ @interface OFGZIPStream: OFStream { OFStream *_stream; OFInflateStream *_Nullable _inflateStream; enum of_gzip_stream_state { OF_GZIP_STREAM_ID1, OF_GZIP_STREAM_ID2, OF_GZIP_STREAM_COMPRESSION_METHOD, OF_GZIP_STREAM_FLAGS, OF_GZIP_STREAM_MODIFICATION_TIME, OF_GZIP_STREAM_EXTRA_FLAGS, |
︙ | ︙ | |||
65 66 67 68 69 70 71 | OF_GZIP_STREAM_OS_NTFS = 11, OF_GZIP_STREAM_OS_QDOS = 12, OF_GZIP_STREAM_OS_ACORN_RISCOS = 13, OF_GZIP_STREAM_OS_UNKNOWN = 255 } _OS; size_t _bytesRead; uint8_t _buffer[4]; | | > > > > > > > > > > > > > > > | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | OF_GZIP_STREAM_OS_NTFS = 11, OF_GZIP_STREAM_OS_QDOS = 12, OF_GZIP_STREAM_OS_ACORN_RISCOS = 13, OF_GZIP_STREAM_OS_UNKNOWN = 255 } _OS; size_t _bytesRead; uint8_t _buffer[4]; OFDate *_Nullable _modificationDate; uint16_t _extraLength; uint32_t _CRC32, _uncompressedSize; } /*! * @brief Creates a new OFGZIPStream with the specified underlying stream. * * @param stream The underlying stream for the OFGZIPStream * @return A new, autoreleased OFGZIPStream */ + (instancetype)streamWithStream: (OFStream *)stream; - init OF_UNAVAILABLE; /*! * @brief Initializes an already allocated OFGZIPStream with the specified * underlying stream. * * @param stream The underlying stream for the OFGZIPStream * @return An initialized OFGZIPStream */ - initWithStream: (OFStream *)stream OF_DESIGNATED_INITIALIZER; @end OF_ASSUME_NONNULL_END |