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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
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,
OF_GZIP_STREAM_OS,
OF_GZIP_STREAM_EXTRA_LENGTH,
OF_GZIP_STREAM_EXTRA,
OF_GZIP_STREAM_NAME,
OF_GZIP_STREAM_COMMENT,
OF_GZIP_STREAM_HEADER_CRC16,
OF_GZIP_STREAM_DATA,
OF_GZIP_STREAM_CRC32,
OF_GZIP_STREAM_UNCOMPRESSED_SIZE
} _state;
enum of_gzip_stream_flags {
OF_GZIP_STREAM_FLAG_TEXT = 0x01,
OF_GZIP_STREAM_FLAG_HEADER_CRC16 = 0x02,
OF_GZIP_STREAM_FLAG_EXTRA = 0x04,
OF_GZIP_STREAM_FLAG_NAME = 0x08,
OF_GZIP_STREAM_FLAG_COMMENT = 0x10
} _flags;
uint8_t _extraFlags;
enum of_gzip_stream_os {
OF_GZIP_STREAM_OS_FAT = 0,
OF_GZIP_STREAM_OS_AMIGA = 1,
OF_GZIP_STREAM_OS_VMS = 2,
OF_GZIP_STREAM_OS_UNIX = 3,
OF_GZIP_STREAM_OS_VM_CMS = 4,
OF_GZIP_STREAM_OS_ATARI_TOS = 5,
OF_GZIP_STREAM_OS_HPFS = 6,
OF_GZIP_STREAM_OS_MACINTOSH = 7,
OF_GZIP_STREAM_OS_Z_SYSTEM = 8,
OF_GZIP_STREAM_OS_CP_M = 9,
OF_GZIP_STREAM_OS_TOPS_20 = 10,
OF_GZIP_STREAM_OS_NTFS = 11,
OF_GZIP_STREAM_OS_QDO = 12,
OF_GZIP_STREAM_OS_ACORN_RISC_OS = 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
* @param mode The mode for the OFGZIPStream. Valid modes are "r" for reading
* and "w" for writing.
* @return A new, autoreleased OFGZIPStream
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
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
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
104
105
106
107
108
|
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,
OF_GZIP_STREAM_OPERATING_SYSTEM,
OF_GZIP_STREAM_EXTRA_LENGTH,
OF_GZIP_STREAM_EXTRA,
OF_GZIP_STREAM_NAME,
OF_GZIP_STREAM_COMMENT,
OF_GZIP_STREAM_HEADER_CRC16,
OF_GZIP_STREAM_DATA,
OF_GZIP_STREAM_CRC32,
OF_GZIP_STREAM_UNCOMPRESSED_SIZE
} _state;
enum of_gzip_stream_flags {
OF_GZIP_STREAM_FLAG_TEXT = 0x01,
OF_GZIP_STREAM_FLAG_HEADER_CRC16 = 0x02,
OF_GZIP_STREAM_FLAG_EXTRA = 0x04,
OF_GZIP_STREAM_FLAG_NAME = 0x08,
OF_GZIP_STREAM_FLAG_COMMENT = 0x10
} _flags;
uint8_t _extraFlags;
enum of_gzip_stream_operating_system {
OF_GZIP_STREAM_OPERATING_SYSTEM_FAT = 0,
OF_GZIP_STREAM_OPERATING_SYSTEM_AMIGA = 1,
OF_GZIP_STREAM_OPERATING_SYSTEM_VMS = 2,
OF_GZIP_STREAM_OPERATING_SYSTEM_UNIX = 3,
OF_GZIP_STREAM_OPERATING_SYSTEM_VM_CMS = 4,
OF_GZIP_STREAM_OPERATING_SYSTEM_ATARI_TOS = 5,
OF_GZIP_STREAM_OPERATING_SYSTEM_HPFS = 6,
OF_GZIP_STREAM_OPERATING_SYSTEM_MACINTOSH = 7,
OF_GZIP_STREAM_OPERATING_SYSTEM_Z_SYSTEM = 8,
OF_GZIP_STREAM_OPERATING_SYSTEM_CP_M = 9,
OF_GZIP_STREAM_OPERATING_SYSTEM_TOPS_20 = 10,
OF_GZIP_STREAM_OPERATING_SYSTEM_NTFS = 11,
OF_GZIP_STREAM_OPERATING_SYSTEM_QDO = 12,
OF_GZIP_STREAM_OPERATING_SYSTEM_ACORN_RISC_OS = 13,
OF_GZIP_STREAM_OPERATING_SYSTEM_UNKNOWN = 255
} _operatingSystemMadeOn;
size_t _bytesRead;
uint8_t _buffer[4];
OFDate *_Nullable _modificationDate;
uint16_t _extraLength;
uint32_t _CRC32, _uncompressedSize;
}
/*!
* @brief The operating system on which the data was compressed.
*
* This property is only guaranteed to be available once @ref atEndOfStream is
* true.
*/
@property (readonly, nonatomic)
enum of_gzip_stream_operating_system operatingSystemMadeOn;
/*!
* @brief The modification date of the original file.
*
* This property is only guaranteed to be available once @ref atEndOfStream is
* true.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFDate *modificationDate;
/*!
* @brief Creates a new OFGZIPStream with the specified underlying stream.
*
* @param stream The underlying stream for the OFGZIPStream
* @param mode The mode for the OFGZIPStream. Valid modes are "r" for reading
* and "w" for writing.
* @return A new, autoreleased OFGZIPStream
|