Lines Matching refs:fh
204 func (w *Writer) CreateHeader(fh *FileHeader) (io.Writer, error) {
205 fh.Flags |= DataDescriptorFlag // writing a data descriptor
206 return w.createHeaderImpl(fh)
220 func (w *Writer) createHeaderImpl(fh *FileHeader) (io.Writer, error) {
227 if len(w.dir) > 0 && w.dir[len(w.dir)-1].FileHeader == fh {
234 fh.CreatorVersion = fh.CreatorVersion&0xff00 | zipVersion20 // preserve compatibility byte
235 fh.ReaderVersion = zipVersion20
242 comp := w.compressor(fh.Method)
254 FileHeader: fh,
260 if err := writeHeader(w.cw, fh); err != nil {
375 fh := w.header.FileHeader
376 fh.CRC32 = w.crc32.Sum32()
377 fh.CompressedSize64 = uint64(w.compCount.count)
378 fh.UncompressedSize64 = uint64(w.rawCount.count)
380 if fh.isZip64() {
381 fh.CompressedSize = uint32max
382 fh.UncompressedSize = uint32max
383 fh.ReaderVersion = zipVersion45 // requires 4.5 - File uses ZIP64 format extensions
385 fh.CompressedSize = uint32(fh.CompressedSize64)
386 fh.UncompressedSize = uint32(fh.UncompressedSize64)
390 if fh.Flags&DataDescriptorFlag != 0 {
397 if fh.isZip64() {
404 b.uint32(fh.CRC32)
405 if fh.isZip64() {
406 b.uint64(fh.CompressedSize64)
407 b.uint64(fh.UncompressedSize64)
409 b.uint32(fh.CompressedSize)
410 b.uint32(fh.UncompressedSize)