archive/zip: more efficient reader and bug fix

Fixes #2090.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4815068
This commit is contained in:
Andrew Gerrand 2011-07-29 10:47:00 -07:00
parent 60dac9b3db
commit e0b6f4721f
3 changed files with 121 additions and 116 deletions

View file

@ -24,6 +24,9 @@ const (
fileHeaderSignature = 0x04034b50
directoryHeaderSignature = 0x02014b50
directoryEndSignature = 0x06054b50
fileHeaderLen = 30 // + filename + extra
directoryHeaderLen = 46 // + filename + extra + comment
directoryEndLen = 22 // + comment
dataDescriptorLen = 12
)