diff options
Diffstat (limited to 'src/pkg/compress/zlib')
| -rw-r--r-- | src/pkg/compress/zlib/reader.go | 4 | ||||
| -rw-r--r-- | src/pkg/compress/zlib/writer.go | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/compress/zlib/reader.go b/src/pkg/compress/zlib/reader.go index c00258995..ffe5cbafc 100644 --- a/src/pkg/compress/zlib/reader.go +++ b/src/pkg/compress/zlib/reader.go @@ -44,10 +44,10 @@ func NewInflater(r io.Reader) (io.ReadCloser, os.Error) { return nil, err } h := uint(z.scratch[0])<<8 | uint(z.scratch[1]); - if (z.scratch[0] & 0x0f != zlibDeflate) || (h%31 != 0) { + if (z.scratch[0]&0x0f != zlibDeflate) || (h%31 != 0) { return nil, HeaderError } - if z.scratch[1] & 0x20 != 0 { + if z.scratch[1]&0x20 != 0 { // BUG(nigeltao): The zlib package does not implement the FDICT flag. return nil, UnsupportedError } diff --git a/src/pkg/compress/zlib/writer.go b/src/pkg/compress/zlib/writer.go index 9b23b2293..25abcde3b 100644 --- a/src/pkg/compress/zlib/writer.go +++ b/src/pkg/compress/zlib/writer.go @@ -97,10 +97,10 @@ func (z *writer) Close() os.Error { } checksum := z.digest.Sum32(); // ZLIB (RFC 1950) is big-endian, unlike GZIP (RFC 1952). - z.scratch[0] = uint8(checksum>>24); - z.scratch[1] = uint8(checksum>>16); - z.scratch[2] = uint8(checksum>>8); - z.scratch[3] = uint8(checksum>>0); + z.scratch[0] = uint8(checksum >> 24); + z.scratch[1] = uint8(checksum >> 16); + z.scratch[2] = uint8(checksum >> 8); + z.scratch[3] = uint8(checksum >> 0); _, z.err = z.w.Write(z.scratch[0:4]); return z.err; } |
