1 namespace System.IO.Compression {
2 // Do not rearrange the enum values.
3 internal enum InflaterState {
4 ReadingHeader = 0, // Only applies to GZIP
6 ReadingBFinal = 2, // About to read bfinal bit
7 ReadingBType = 3, // About to read blockType bits
9 ReadingNumLitCodes = 4, // About to read # literal codes
10 ReadingNumDistCodes = 5, // About to read # dist codes
11 ReadingNumCodeLengthCodes = 6, // About to read # code length codes
12 ReadingCodeLengthCodes = 7, // In the middle of reading the code length codes
13 ReadingTreeCodesBefore = 8, // In the middle of reading tree codes (loop top)
14 ReadingTreeCodesAfter = 9, // In the middle of reading tree codes (extension; code > 15)
16 DecodeTop = 10, // About to decode a literal (char/match) in a compressed block
17 HaveInitialLength = 11, // Decoding a match, have the literal code (base length)
18 HaveFullLength = 12, // Ditto, now have the full match length (incl. extra length bits)
19 HaveDistCode = 13, // Ditto, now have the distance code also, need extra dist bits
21 /* uncompressed blocks */
22 UncompressedAligning = 15,
23 UncompressedByte1 = 16,
24 UncompressedByte2 = 17,
25 UncompressedByte3 = 18,
26 UncompressedByte4 = 19,
27 DecodingUncompressed = 20,
29 // These three apply only to GZIP
30 StartReadingFooter = 21, // (Initialisation for reading footer)