Index: net/base/gzip_header.h |
diff --git a/net/base/gzip_header.h b/net/base/gzip_header.h |
index 81f6f19829e9a7d2f296796ba8d67784e779dcfc..c245de2c8be04af413bd9dde196918ecf5c91176 100644 |
--- a/net/base/gzip_header.h |
+++ b/net/base/gzip_header.h |
@@ -20,9 +20,16 @@ |
class GZipHeader { |
public: |
+ enum Status { |
+ INCOMPLETE_HEADER, // don't have all the bits yet... |
+ COMPLETE_HEADER, // complete, valid header |
+ INVALID_HEADER, // found something invalid in the header |
+ }; |
+ |
GZipHeader() { |
Reset(); |
} |
+ |
~GZipHeader() { |
} |
@@ -33,12 +40,6 @@ class GZipHeader { |
extra_length_ = 0; |
} |
- enum Status { |
- INCOMPLETE_HEADER, // don't have all the bits yet... |
- COMPLETE_HEADER, // complete, valid header |
- INVALID_HEADER, // found something invalid in the header |
- }; |
- |
// Attempt to parse the given buffer as the next installment of |
// bytes from a gzip header. If the bytes we've seen so far do not |
// yet constitute a complete gzip header, return |
@@ -49,9 +50,6 @@ class GZipHeader { |
Status ReadMore(const char* inbuf, int inbuf_len, |
const char** header_end); |
private: |
- |
- static const uint8 magic[]; // gzip magic header |
- |
enum { // flags (see RFC) |
FLAG_FTEXT = 0x01, // bit 0 set: file probably ascii text |
FLAG_FHCRC = 0x02, // bit 1 set: header CRC present |
@@ -88,6 +86,8 @@ class GZipHeader { |
IN_DONE, |
}; |
+ static const uint8 magic[]; // gzip magic header |
+ |
int state_; // our current State in the parsing FSM: an int so we can ++ |
uint8 flags_; // the flags byte of the header ("FLG" in the RFC) |
uint16 extra_length_; // how much of the "extra field" we have yet to read |