Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ByteOrder = []byte{0xFE, 0xFF}
ByteOrder - This field MUST be set to 0xFFFE. This field is a byte order mark for all integer fields, specifying little-endian byte order.
var DIFSECT = []byte{0xFC, 0xFF, 0xFF, 0xFF}
DIFSECT - Specifies a DIFAT sector in the FAT.
var DefaultDIFATEntries = uint32(109)
DefaultDIFATEntries -Number FAT locations in DIFAT
var ENDOFCHAIN = []byte{0xFE, 0xFF, 0xFF, 0xFF}
ENDOFCHAIN - End of a linked chain of sectors.
var EntrySize = 128
EntrySize - Directory array entry length
var FATSECT = []byte{0xFD, 0xFF, 0xFF, 0xFF}
FATSECT - Specifies a FAT sector in the FAT.
var FREESECT = []byte{0xFF, 0xFF, 0xFF, 0xFF}
FREESECT - Specifies an unallocated sector in the FAT, Mini FAT, or DIFAT
var HeaderSignature = []byte{0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1}
HeaderSignature Identification signature for the compound file structure, and MUST be set to the value ...
var MajorVersion = [][]byte{MajorVersion3, MajorVersion4}
MajorVersion -Version number for breaking changes. This field MUST be set to either 0x0003 (version 3) or 0x0004 (version 4).
var MajorVersion3 = []byte{0x03, 0x00}
MajorVersion3 - Version number sign fot version 3
var MajorVersion4 = []byte{0x04, 0x00}
MajorVersion4 - Version number sign fot version 4
var MiniSectorShift = []byte{0x06, 0x00}
MiniSectorShift - This field MUST be set to 0x0009, or 0x000c, depending on the Major Version field. This field specifies the sector size of the compound file as a power of 2.
var MiniStreamCutoffSize = []byte{0x00, 0x10, 0x00, 0x00}
MiniStreamCutoffSize - This integer field MUST be set to 0x00001000. This field specifies the maximum size of a user-defined data stream that is allocated from the mini FAT and mini stream, and that cutoff is 4,096 bytes. Any user-defined data stream that is greater than or equal to this cutoff size must be allocated as normal sectors from the FAT.
var NumberDirectorySectorsForMajorVersion3 = []byte{0x00, 0x00, 0x00, 0x00}
NumberDirectorySectorsForMajorVersion3 - If Major Version is 3, the Number of Directory Sectors MUST be zero.
var Reserved = []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
Reserved - This field MUST be set to all zeroes.
var SectorShiftForMajorVersion3 = []byte{0x09, 0x00}
SectorShiftForMajorVersion3 - If Major Version is 3, the Sector Shift MUST be 0x0009, specifying a sector size of 512 bytes.
var SectorShiftForMajorVersion4 = []byte{0x0C, 0x00}
SectorShiftForMajorVersion4 - If Major Version is 4, the Sector Shift MUST be 0x000C, specifying a sector size of 4096 bytes.
Functions ¶
This section is empty.
Types ¶
type Cfb ¶
type Cfb struct {
// contains filtered or unexported fields
}
Cfb - Compound File Binary
func OpenReader ¶
func OpenReader(reader io.ReadSeeker) (cfb Cfb, err error)
OpenReader - Open document from the reader
func (*Cfb) OpenObject ¶
OpenObject - Get object stream
type Directory ¶
type Directory struct { DirectoryEntryName [64]byte DirectoryEntryNameLength [2]byte ObjectType byte ColorFlag [1]byte LeftSiblingID [4]byte RightSiblingID [4]byte ChildID [4]byte CLSID [16]byte StateBits [4]byte CreationTime [8]byte ModifiedTime [8]byte StartingSectorLocation [4]byte StreamSize [8]byte }
Directory - Compound File Directory Entry
func (*Directory) GetStartingSectorLocation ¶
GetStartingSectorLocation - The start sector of the object
func (*Directory) GetStreamSize ¶
GetStreamSize - Object size
type Header ¶
type Header struct { HeaderSignature [8]byte HeaderCLSID [16]byte MinorVersion [2]byte MajorVersion [2]byte ByteOrder [2]byte SectorShift [2]byte MiniSectorShift [2]byte Reserved [6]byte NumberDirectorySectors [4]byte NumberFATSectors [4]byte FirstDirectorySectorLocation [4]byte TransactionSignatureNumber [4]byte MiniStreamCutoffSize [4]byte FirstMiniFATSectorLocation [4]byte NumberMiniFATSectors [4]byte FirstDIFATSectorLocation [4]byte NumberDIFATSectors [4]byte DIFAT [3584]byte }
Header - The Compound File Header structure
type Sector ¶
Sector struct
func NewMiniFatSector ¶
NewMiniFatSector - Create new Sector struct for MiniFat