Home
last modified time | relevance | path

Searched refs:fh (Results 1 – 10 of 10) sorted by relevance

/build/soong/third_party/zip/
Dandroid.go35 fh := &fileHeader
39 fh.Extra = stripExtras(fh.Extra)
42 FileHeader: fh,
47 if err := writeHeader(w.cw, fh); err != nil {
59 if fh.isZip64() {
66 b.uint32(fh.CRC32)
67 if fh.isZip64() {
68 b.uint64(fh.CompressedSize64)
69 b.uint64(fh.UncompressedSize64)
71 b.uint32(fh.CompressedSize)
[all …]
Dwriter.go197 func (w *Writer) CreateHeader(fh *FileHeader) (io.Writer, error) {
198 fh.Flags |= DataDescriptorFlag // writing a data descriptor
199 return w.createHeaderImpl(fh)
213 func (w *Writer) createHeaderImpl(fh *FileHeader) (io.Writer, error) {
220 if len(w.dir) > 0 && w.dir[len(w.dir)-1].FileHeader == fh {
227 fh.CreatorVersion = fh.CreatorVersion&0xff00 | zipVersion20 // preserve compatibility byte
228 fh.ReaderVersion = zipVersion20
235 comp := w.compressor(fh.Method)
247 FileHeader: fh,
253 if err := writeHeader(w.cw, fh); err != nil {
[all …]
Dstruct.go100 fh *FileHeader member
103 func (fi headerFileInfo) Name() string { return path.Base(fi.fh.Name) }
105 if fi.fh.UncompressedSize64 > 0 {
106 return int64(fi.fh.UncompressedSize64)
108 return int64(fi.fh.UncompressedSize)
111 func (fi headerFileInfo) ModTime() time.Time { return fi.fh.ModTime() }
112 func (fi headerFileInfo) Mode() os.FileMode { return fi.fh.Mode() }
113 func (fi headerFileInfo) Sys() interface{} { return fi.fh }
122 fh := &FileHeader{
126 fh.SetModTime(fi.ModTime())
[all …]
Dzip_test.go58 fh := new(FileHeader)
59 fh.SetModTime(testTime)
60 outTime := fh.ModTime()
66 func testHeaderRoundTrip(fh *FileHeader, wantUncompressedSize uint32, wantUncompressedSize64 uint64…
67 fi := fh.FileInfo()
72 if got, want := fh2.Name, fh.Name; got != want {
81 if got, want := fh2.ModifiedTime, fh.ModifiedTime; got != want {
84 if got, want := fh2.ModifiedDate, fh.ModifiedDate; got != want {
88 if sysfh, ok := fi.Sys().(*FileHeader); !ok && sysfh != fh {
94 fh := &FileHeader{
[all …]
/build/soong/zip/
Dzip_test.go55 func fh(name string, contents []byte, method uint16) zip.FileHeader { func
131 fh("a/a/a", fileA, zip.Deflate),
132 fh("a/a/b", fileB, zip.Deflate),
133 fh("c", fileC, zip.Deflate),
145 fh("a/a", fileA, zip.Deflate),
146 fh("a/b", fileB, zip.Deflate),
160 fh("a/a", fileA, zip.Deflate),
161 fh("a/b", fileB, zip.Deflate),
175 fh("a/a/a", fileA, zip.Store),
176 fh("a/a/b", fileB, zip.Store),
[all …]
Dzip.go199 fh *zip.FileHeader member
539 if op.fh.Method == zip.Deflate {
540 currentWriter, err = zipw.CreateCompressedHeader(op.fh)
544 op.fh.CompressedSize64 = op.fh.UncompressedSize64
546 zw, err = zipw.CreateHeaderAndroid(op.fh)
714 fh, buf, err := jar.ManifestFileContents(contents)
721 return z.writeFileContents(fh, reader)
734 fh: header,
811 ze.fh.CRC32 = crc.Sum32()
873 ze.fh.CRC32 = crc.Sum32()
[all …]
/build/soong/jar/
Djar.go93 fh := &zip.FileHeader{
98 fh.SetMode(0700)
99 fh.SetModTime(DefaultTime)
101 return fh, b, nil
/build/soong/cmd/merge_zips/
Dmerge_zips.go102 fh *zip.FileHeader member
111 return be.fh.FileInfo().IsDir()
123 w, err := zw.CreateHeader(be.fh)
195 fh, buf, err := jar.ManifestFileContents(contents)
197 _, err = oz.addZipEntry(jar.ManifestFile, ZipEntryFromBuffer{fh, buf})
207 fh := &zip.FileHeader{
212 fh.SetMode(0700)
213 fh.SetModTime(jar.DefaultTime)
214 _, err = oz.addZipEntry(name, ZipEntryFromBuffer{fh, buf})
221 fh := &zip.FileHeader{
[all …]
Dmerge_zips_test.go285 fh := zip.FileHeader{
288 fh.SetMode(e.mode)
290 w, err := zw.CreateHeader(&fh)
/build/soong/cmd/zip2zip/
Dzip2zip.go221 fh := match.File.FileHeader
222 fh.Name = match.newName
223 fh.Method = zip.Store
224 fh.CompressedSize64 = fh.UncompressedSize64
226 zw, err := writer.CreateHeaderAndroid(&fh)