Lines Matching refs:h

70 	for _, h := range w.dir {
74 b.uint16(h.CreatorVersion)
75 b.uint16(h.ReaderVersion)
76 b.uint16(h.Flags)
77 b.uint16(h.Method)
78 b.uint16(h.ModifiedTime)
79 b.uint16(h.ModifiedDate)
80 b.uint32(h.CRC32)
81 if h.isZip64() || h.offset >= uint32max {
93 eb.uint64(h.UncompressedSize64)
94 eb.uint64(h.CompressedSize64)
95 eb.uint64(h.offset)
96 h.Extra = append(h.Extra, buf[:]...)
98 b.uint32(h.CompressedSize)
99 b.uint32(h.UncompressedSize)
101 b.uint16(uint16(len(h.Name)))
102 b.uint16(uint16(len(h.Extra)))
103 b.uint16(uint16(len(h.Comment)))
105 b.uint32(h.ExternalAttrs)
106 if h.offset > uint32max {
109 b.uint32(uint32(h.offset))
114 if _, err := io.WriteString(w.cw, h.Name); err != nil {
117 if _, err := w.cw.Write(h.Extra); err != nil {
120 if _, err := io.WriteString(w.cw, h.Comment); err != nil {
246 h := &header{
250 w.dir = append(w.dir, h)
251 fw.header = h
261 func writeHeader(w io.Writer, h *FileHeader) error {
265 b.uint16(h.ReaderVersion)
266 b.uint16(h.Flags)
267 b.uint16(h.Method)
268 b.uint16(h.ModifiedTime)
269 b.uint16(h.ModifiedDate)
271 if h.Flags&DataDescriptorFlag != 0 {
277 b.uint32(h.CRC32)
279 if h.CompressedSize64 > uint32max || h.UncompressedSize64 > uint32max {
282 compressedSize := uint32(h.CompressedSize64)
284 compressedSize = h.CompressedSize
287 uncompressedSize := uint32(h.UncompressedSize64)
289 uncompressedSize = h.UncompressedSize
296 b.uint16(uint16(len(h.Name)))
297 b.uint16(uint16(len(h.Extra)))
301 if _, err := io.WriteString(w, h.Name); err != nil {
304 _, err := w.Write(h.Extra)