Documentation ¶
Index ¶
- Constants
- Variables
- func ReadArraySI16[T ~int16](r DataReader, n int) (d []T, err error)
- func ReadArraySI8[T ~int8](r DataReader, n int) (d []T, err error)
- func ReadArrayU16[T ~uint16](r DataReader, n int) (d []T, err error)
- func ReadArrayU24[T ~uint32](r DataReader, n int) (d []T, err error)
- func ReadArrayU32[T ~uint32](r DataReader, n int) (d []T, err error)
- func ReadArrayU64[T ~uint64](r DataReader, n int) (d []T, err error)
- func ReadArrayU8[T ~uint8](r DataReader, n int) (d []T, err error)
- func ReadBool(r DataReader) (d bool, err error)
- func ReadEncodedU32[T ~uint32](r DataReader) (d T, err error)
- func ReadFB(r DataReader, n uint64) (d int32, err error)
- func ReadNullTerminatedString(r DataReader, swfVersion uint8) (d string, err error)
- func ReadSB[T ~int | ~int64 | ~int32 | ~int16 | ~int8](r DataReader, n uint64) (d T, err error)
- func ReadSI16[T ~int16](r DataReader, d *T) (err error)
- func ReadSI32[T ~int32](r DataReader, d *T) (err error)
- func ReadSI64[T ~int64](r DataReader, d *T) (err error)
- func ReadSI8[T ~int8](r DataReader, d *T) (err error)
- func ReadType(r DataReader, ctx ReaderContext, data any) (err error)
- func ReadTypeInner(r DataReader, ctx ReaderContext, data any) (err error)
- func ReadU16[T ~uint16](r DataReader, d *T) (err error)
- func ReadU24[T ~uint32](r DataReader, d *T) (err error)
- func ReadU32[T ~uint32](r DataReader, d *T) (err error)
- func ReadU64[T ~uint64](r DataReader, d *T) (err error)
- func ReadU8[T ~uint8](r DataReader, d *T) (err error)
- func ReadUB[T ~uint | ~uint64 | ~uint32 | ~uint16 | ~uint8](r DataReader, n uint64) (d T, err error)
- type ARGB
- type CXFORM
- type CXFORMWITHALPHA
- type Color
- type DataReader
- type Fixed16
- type Fixed8
- type Float16
- type Header
- type HeaderSignature
- type MATRIX
- type RECT
- type RGB
- type RGBA
- type ReaderContext
- type Twip
- type TypeDefault
- type TypeFuncConditional
- type TypeFuncNumber
- type TypeReader
- type UntilEnd
- type UntilEndBytes
Constants ¶
View Source
const DoParserDebug = false
View Source
const TwipFactor = 20
Variables ¶
View Source
var SignatureCompressedLZMA = HeaderSignature{'Z', 'W', 'S'}
View Source
var SignatureCompressedZLIB = HeaderSignature{'C', 'W', 'S'}
View Source
var SignatureUncompressed = HeaderSignature{'F', 'W', 'S'}
Functions ¶
func ReadArraySI16 ¶
func ReadArraySI16[T ~int16](r DataReader, n int) (d []T, err error)
func ReadArraySI8 ¶
func ReadArraySI8[T ~int8](r DataReader, n int) (d []T, err error)
func ReadArrayU16 ¶
func ReadArrayU16[T ~uint16](r DataReader, n int) (d []T, err error)
func ReadArrayU24 ¶
func ReadArrayU24[T ~uint32](r DataReader, n int) (d []T, err error)
func ReadArrayU32 ¶
func ReadArrayU32[T ~uint32](r DataReader, n int) (d []T, err error)
func ReadArrayU64 ¶
func ReadArrayU64[T ~uint64](r DataReader, n int) (d []T, err error)
func ReadArrayU8 ¶
func ReadArrayU8[T ~uint8](r DataReader, n int) (d []T, err error)
func ReadBool ¶
func ReadBool(r DataReader) (d bool, err error)
func ReadEncodedU32 ¶
func ReadEncodedU32[T ~uint32](r DataReader) (d T, err error)
func ReadNullTerminatedString ¶
func ReadNullTerminatedString(r DataReader, swfVersion uint8) (d string, err error)
func ReadSI16 ¶
func ReadSI16[T ~int16](r DataReader, d *T) (err error)
func ReadSI32 ¶
func ReadSI32[T ~int32](r DataReader, d *T) (err error)
func ReadSI64 ¶
func ReadSI64[T ~int64](r DataReader, d *T) (err error)
func ReadSI8 ¶
func ReadSI8[T ~int8](r DataReader, d *T) (err error)
func ReadType ¶
func ReadType(r DataReader, ctx ReaderContext, data any) (err error)
func ReadTypeInner ¶
func ReadTypeInner(r DataReader, ctx ReaderContext, data any) (err error)
func ReadU16 ¶
func ReadU16[T ~uint16](r DataReader, d *T) (err error)
func ReadU24 ¶
func ReadU24[T ~uint32](r DataReader, d *T) (err error)
func ReadU32 ¶
func ReadU32[T ~uint32](r DataReader, d *T) (err error)
func ReadU64 ¶
func ReadU64[T ~uint64](r DataReader, d *T) (err error)
func ReadU8 ¶
func ReadU8[T ~uint8](r DataReader, d *T) (err error)
Types ¶
type CXFORM ¶
type CXFORM struct { Flag struct { HasAddTerms bool HasMultTerms bool } NBits uint8 `swfBits:",4"` Multiply struct { Red Fixed8 `swfBits:"NBits,fixed"` Green Fixed8 `swfBits:"NBits,fixed"` Blue Fixed8 `swfBits:"NBits,fixed"` } `swfCondition:"Flag.HasMultTerms"` Add struct { Red int16 `swfBits:"NBits,signed"` Green int16 `swfBits:"NBits,signed"` Blue int16 `swfBits:"NBits,signed"` } `swfCondition:"Flag.HasAddTerms"` // contains filtered or unexported fields }
func (*CXFORM) SWFDefault ¶
func (cf *CXFORM) SWFDefault(ctx ReaderContext)
type CXFORMWITHALPHA ¶
type CXFORMWITHALPHA struct { Flag struct { HasAddTerms bool HasMultTerms bool } NBits uint8 `swfBits:",4"` Multiply struct { Red Fixed8 `swfBits:"NBits,fixed"` Green Fixed8 `swfBits:"NBits,fixed"` Blue Fixed8 `swfBits:"NBits,fixed"` Alpha Fixed8 `swfBits:"NBits,fixed"` } `swfCondition:"Flag.HasMultTerms"` Add struct { Red int16 `swfBits:"NBits,signed"` Green int16 `swfBits:"NBits,signed"` Blue int16 `swfBits:"NBits,signed"` Alpha int16 `swfBits:"NBits,signed"` } `swfCondition:"Flag.HasAddTerms"` // contains filtered or unexported fields }
func (*CXFORMWITHALPHA) SWFDefault ¶
func (cf *CXFORMWITHALPHA) SWFDefault(ctx ReaderContext)
type DataReader ¶
type Float16 ¶
Float16 TODO: check if proper values
func (*Float16) SWFRead ¶
func (f *Float16) SWFRead(r DataReader, ctx ReaderContext) (err error)
type HeaderSignature ¶
type HeaderSignature [3]uint8
type MATRIX ¶
type MATRIX struct { HasScale bool NScaleBits uint8 `swfCondition:"HasScale" swfBits:",5"` ScaleX, ScaleY Fixed16 `swfCondition:"HasScale" swfBits:"NScaleBits,fixed"` HasRotate bool NRotateBits uint8 `swfCondition:"HasRotate" swfBits:",5"` RotateSkew0, RotateSkew1 Fixed16 `swfCondition:"HasRotate" swfBits:"NRotateBits,fixed"` NTranslateBits uint8 `swfBits:",5"` TranslateX, TranslateY Twip `swfBits:"NTranslateBits,signed"` // contains filtered or unexported fields }
func (*MATRIX) SWFDefault ¶
func (matrix *MATRIX) SWFDefault(ctx ReaderContext)
type ReaderContext ¶
type ReaderContext struct { Version uint8 Root reflect.Value Flags []string FieldType reflect.StructField }
func (ReaderContext) GetNestedType ¶
func (ctx ReaderContext) GetNestedType(fields ...string) reflect.Value
type TypeDefault ¶
type TypeDefault interface {
SWFDefault(ctx ReaderContext)
}
type TypeFuncConditional ¶
type TypeFuncConditional func(ctx ReaderContext) bool
type TypeFuncNumber ¶
type TypeFuncNumber func(ctx ReaderContext) uint64
type TypeReader ¶
type TypeReader interface {
SWFRead(reader DataReader, ctx ReaderContext) error
}
type UntilEnd ¶
type UntilEnd[T any] []T
func (*UntilEnd[T]) SWFRead ¶
func (b *UntilEnd[T]) SWFRead(r DataReader, ctx ReaderContext) (err error)
type UntilEndBytes ¶
Click to show internal directories.
Click to hide internal directories.