ole2

package module
v0.0.0-...-50017c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

ole2

Microsoft Compound Document File Format library in Golang

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DEBUG = false
View Source
var ENDOFCHAIN = uint32(0xFFFFFFFE) //-2
View Source
var FREESECT = uint32(0xFFFFFFFF) // -1

Functions

This section is empty.

Types

type DIR_TYPE

type DIR_TYPE byte
const (
	EMPTY       DIR_TYPE = 0
	USERSTORAGE DIR_TYPE = 1
	USERSTREAM  DIR_TYPE = 2
	LOCKBYTES   DIR_TYPE = 3
	PROPERTY    DIR_TYPE = 4
	ROOT        DIR_TYPE = 5
)

func (DIR_TYPE) String

func (t DIR_TYPE) String() string

type File

type File struct {
	NameBts   [32]uint16
	Bsize     uint16
	Type      DIR_TYPE
	Flag      byte
	Left      uint32
	Right     uint32
	Child     uint32
	Guid      [16]byte
	Userflags uint32
	Time      [2]uint64
	Sstart    uint32
	Size      uint32
	Proptype  uint32
}

func (*File) Name

func (d *File) Name() string
type Header struct {
	Id        [2]uint32
	Clid      [4]uint32
	Verminor  uint16
	Verdll    uint16
	Byteorder uint16
	Lsectorb  uint16
	Lssectorb uint16

	Cfat     uint32 //Total number of sectors used for the sector allocation table
	Dirstart uint32 //SecID of first sector of the directory stream

	Sectorcutoff uint32 //Minimum size of a standard stream
	Sfatstart    uint32 //SecID of first sector of the short-sector allocation table
	Csfat        uint32 //Total number of sectors used for the short-sector allocation table
	Difstart     uint32 //SecID of first sector of the master sector allocation table
	Cdif         uint32 //Total number of sectors used for the master sector allocation table
	Msat         [109]uint32
	// contains filtered or unexported fields
}

type Ole

type Ole struct {
	Lsector   uint32
	Lssector  uint32
	SecID     []uint32
	SSecID    []uint32
	RootClsID [16]byte
	Files     []File
	// contains filtered or unexported fields
}

func Open

func Open(reader io.ReadSeeker) (ole *Ole, err error)

func (*Ole) OpenFile

func (o *Ole) OpenFile(file *File) io.ReadSeeker

type Ole10Native

type Ole10Native struct {
	NativeSize uint32 // file size
	Name       string
	CacheName  string
	NativeData []byte
}

func ParseOle10Native

func ParseOle10Native(r io.Reader) (obj *Ole10Native, e error)

type PSS

type PSS struct {
	// contains filtered or unexported fields
}

type Sector

type Sector []byte

func (*Sector) AllValues

func (s *Sector) AllValues(size uint32) []uint32

func (*Sector) MsatValues

func (s *Sector) MsatValues(size uint32) []uint32

func (*Sector) NextSid

func (s *Sector) NextSid(size uint32) uint32

func (*Sector) Uint32

func (s *Sector) Uint32(bit uint32) uint32

type Stream

type Stream struct {
	Ole     *Ole
	Start   uint32
	Pos     uint32
	Cfat    int
	Size    int
	Fatpos  uint32
	Bufsize uint32
	Eof     byte
	Sfat    bool
}

type StreamReader

type StreamReader struct {
	// contains filtered or unexported fields
}

func (*StreamReader) Read

func (r *StreamReader) Read(p []byte) (n int, err error)

func (*StreamReader) Seek

func (r *StreamReader) Seek(offset int64, whence int) (offset_result int64, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL