Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Header offsets HeaderIDOffset = 0 HeaderReservedOffset = 4 HeaderLengthOffset = 8 HeaderLinkCountOffset = 16 // Data section offsets DataOrgBlockTypeOffset = 24 DataZipTypeOffset = 26 DataReservedOffset = 27 DataZipParameterOffset = 28 DataOrgDataLengthOffset = 32 DataLengthOffset = 40 DataOffset = 48 )
View Source
const ( // Sizes of fields in bytes HeaderIDSize = 4 HeaderReservedSize = 4 HeaderLengthSize = 8 HeaderLinkCountSize = 8 DataOrgBlockTypeSize = 2 DataZipTypeSize = 1 DataReservedSize = 1 DataZipParameterSize = 4 DataOrgDataLengthSize = 8 DataLengthSize = 8 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Block ¶
func (*Block) BlankBlock ¶
func (*Block) BlockTypeModified ¶
ID modified block with `#` ("##DT", "##SD", "##RD" or "#D#V", "##DI", "##RV", "##RI")
func (*Block) NewCompressType ¶
type Data ¶
type Data struct { //ID original block ("DT", "SD", "RD" or "DV", "DI", "RV", "RI") OrgBlockTyṕe [2]byte //Zip algorithm (Deflate or Transposition + Deflate) ZipType uint8 Reserved [1]byte //Parameter for zip algorithm ZipParameter uint32 //Data section's length OrgDataLenght uint64 //Lenght stored in dz_data (bytes) DataLenght uint64 //Stored value Data []byte }
type Flate ¶
type Flate struct { //Decompressed ID DecompressedID string //Zip algorithm (Deflate==0 or Transposition + Deflate==1) CompressType uint8 //Decompressed size DecompressedLength uint64 //Compressed size CompressedLength uint64 //DataBlock Datablock *[]byte }
func (*Flate) Decompress ¶
type Transposition ¶
type Transposition struct { //Decompressed ID DecompressedID string //Zip algorithm (Deflate or Transposition + Deflate) CompressType uint8 //Decompressed size DecompressedLength uint64 //Compressed size CompressedLength uint64 //Parameter for transposition type (CompressType==1) Parameter uint32 //DataBlock Datablock *[]byte }
func (*Transposition) Decompress ¶
func (t *Transposition) Decompress() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.