ole2

package module
v0.0.0-...-d694296 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2016 License: Apache-2.0 Imports: 6 Imported by: 187 modules, 187 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

ole2

Microsoft Compound Document File Format library in Golang

Documentation

Index

Constants

View Source
const (
	EMPTY       = iota
	USERSTORAGE = iota
	USERSTREAM  = iota
	LOCKBYTES   = iota
	PROPERTY    = iota
	ROOT        = iota
)

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 File

type File struct {
	NameBts   [32]uint16
	Bsize     uint16
	Type      byte
	Flag      byte
	Left      uint32
	Right     uint32
	Child     uint32
	Guid      [8]uint16
	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
	Files    []File
	// contains filtered or unexported fields
}

func Open

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

func (*Ole) ListDir

func (o *Ole) ListDir() (dir []*File, err error)

func (*Ole) OpenFile

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

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
⌂ 换网址