Documentation ¶
Index ¶
- Constants
- type CDFileHeader
- type EndOfCDRecord
- type FileInfo
- type LocalFileHeader
- type Reader
- type TDFReader
- type TDFWriter
- type WriteState
- type Writer
- func (writer *Writer) AddData(data []byte) error
- func (writer *Writer) AddHeader(filename string, size int64) error
- func (writer *Writer) EnableZip64()
- func (writer *Writer) Finish() (int64, error)
- func (writer *Writer) WriteZip64EndOfCentralDirectory() error
- func (writer *Writer) WriteZip64EndOfCentralDirectoryLocator() error
- type Zip32DataDescriptor
- type Zip64DataDescriptor
- type Zip64EndOfCDRecord
- type Zip64EndOfCDRecordLocator
- type Zip64ExtendedInfoExtraField
- type Zip64ExtendedLocalInfoExtraField
- type ZipFileEntry
Constants ¶
const ( TDFManifestFileName = "0.manifest.json" TDFPayloadFileName = "0.payload" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CDFileHeader ¶
type CDFileHeader struct { Signature uint32 VersionCreated uint16 VersionNeeded uint16 GeneralPurposeBitFlag uint16 CompressionMethod uint16 LastModifiedTime uint16 LastModifiedDate uint16 Crc32 uint32 CompressedSize uint32 UncompressedSize uint32 FilenameLength uint16 ExtraFieldLength uint16 FileCommentLength uint16 DiskNumberStart uint16 InternalFileAttributes uint16 ExternalFileAttributes uint32 LocalHeaderOffset uint32 }
type EndOfCDRecord ¶
type LocalFileHeader ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func NewReader ¶
func NewReader(readSeeker io.ReadSeeker) (Reader, error)
NewReader Create archive reader instance.
func (Reader) ReadAllFileData ¶
ReadAllFileData Return all the data of the file if the file is available and below the specified size. NOTE: Use this method for small file sizes.
func (Reader) ReadFileData ¶
ReadFileData Read data from file of given length of size.
type TDFReader ¶
type TDFReader struct {
// contains filtered or unexported fields
}
func NewTDFReader ¶
func NewTDFReader(readSeeker io.ReadSeeker) (TDFReader, error)
NewTDFReader Create tdf reader instance.
func (TDFReader) PayloadSize ¶
PayloadSize Return the size of the payload.
type TDFWriter ¶
type TDFWriter struct {
// contains filtered or unexported fields
}
func NewTDFWriter ¶
NewTDFWriter Create tdf writer instance.
func (*TDFWriter) AppendManifest ¶
AppendManifest Add the manifest to tdf archive.
func (*TDFWriter) AppendPayload ¶
AppendPayload Add payload to sdk archive.
func (*TDFWriter) SetPayloadSize ¶
SetPayloadSize Set 0.payload file size.
type Writer ¶
type Writer struct { FileInfo // contains filtered or unexported fields }
func (*Writer) AddHeader ¶
AddHeader set size of the file. calling this method means finished writing the previous file and starting a new file.
func (*Writer) WriteZip64EndOfCentralDirectory ¶
WriteZip64EndOfCentralDirectory write the zip64 end of central directory record struct to the archive.
func (*Writer) WriteZip64EndOfCentralDirectoryLocator ¶
WriteZip64EndOfCentralDirectoryLocator write the zip64 end of central directory locator struct to the archive.
type Zip32DataDescriptor ¶
type Zip64DataDescriptor ¶
type Zip64EndOfCDRecord ¶
type ZipFileEntry ¶
type ZipFileEntry struct {
// contains filtered or unexported fields
}