Documentation
¶
Overview ¶
Package ebmltext provides a low level API to interacts with EBML documents. Use directly with caution.
Index ¶
- Variables
- func AppendVint(num uint64, b []byte) (w int, err error)
- func AppendVintData(num uint64, minW int, b []byte) (w int, err error)
- func Date(b []byte) (time.Time, error)
- func Float(b []byte) (float64, error)
- func Int(b []byte) (int64, error)
- func ReadVint(b []byte) (vint uint64, w int, err error)
- func ReadVintData(b []byte) (vint uint64, w int, err error)
- func String(b []byte) (string, error)
- func Uint(b []byte) (uint64, error)
- type DecodeSeeker
- type Decoder
- type Encoder
- type Token
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidVINTWidth = fmt.Errorf("ebmltext: invalid VINT_WIDTH") ErrAllOneVINT = fmt.Errorf("ebmltext: VINT_DATA MUST NOT be set to all 1") )
Functions ¶
func AppendVint ¶
AppendVint appends the binary representation of a VINT to b based on https://datatracker.ietf.org/doc/html/rfc8794.html#section-4
func AppendVintData ¶
AppendVintData appends the binary representation of a VINT to b based on https://datatracker.ietf.org/doc/html/rfc8794.html#section-4
func Date ¶
Date reads a time,Time based on https://www.rfc-editor.org/rfc/rfc8794.html#section-7.6
func Float ¶
Float reads a float64 based on https://www.rfc-editor.org/rfc/rfc8794.html#section-7.3
func Int ¶
Int reads an int64 based on https://www.rfc-editor.org/rfc/rfc8794.html#section-7.1
func ReadVint ¶
ReadVint reads the integer representation of a VINT from b based on https://datatracker.ietf.org/doc/html/rfc8794.html#section-4
func ReadVintData ¶
ReadVintData reads the integer representation of a VINT from b based on https://datatracker.ietf.org/doc/html/rfc8794.html#section-4
func String ¶
String reads a string based on https://www.rfc-editor.org/rfc/rfc8794.html#section-7.5
Types ¶
type DecodeSeeker ¶
type DecodeSeeker struct {
// contains filtered or unexported fields
}
type Decoder ¶
type Decoder struct { // https://datatracker.ietf.org/doc/html/rfc8794#section-11.2.4 MaxIDLength uint // https://datatracker.ietf.org/doc/html/rfc8794#section-11.2.5 MaxSizeLength uint // contains filtered or unexported fields }
func NewDecoder ¶
func (*Decoder) InputOffset ¶
func (*Decoder) ReadElementDataSize ¶
ReadElementDataSize reads an Element Data Size based on https://datatracker.ietf.org/doc/html/rfc8794#section-6
TODO: EBMLMaxSizeLength can be greater than 8 https://datatracker.ietf.org/doc/html/rfc8794#section-11.2.5
func (*Decoder) ReadElementID ¶
ReadElementID reads an Element ID based on https://datatracker.ietf.org/doc/html/rfc8794#section-5
TODO: EBMLMaxIDLength can be greater than 8 https://datatracker.ietf.org/doc/html/rfc8794#section-11.2.4
type Encoder ¶
type Encoder struct { // https://datatracker.ietf.org/doc/html/rfc8794#section-11.2.4 MaxIDLength uint // https://datatracker.ietf.org/doc/html/rfc8794#section-11.2.5 MaxSizeLength uint // contains filtered or unexported fields }
func NewEncoder ¶
func (*Encoder) OutputOffset ¶
func (*Encoder) WriteElementDataSize ¶
WriteElementDataSize writes an Element Data Size based on https://datatracker.ietf.org/doc/html/rfc8794#section-6
TODO: EBMLMaxSizeLength can be greater than 8 https://datatracker.ietf.org/doc/html/rfc8794#section-11.2.5
func (*Encoder) WriteElementID ¶
WriteElementID writes an Element ID based on https://datatracker.ietf.org/doc/html/rfc8794#section-5
TODO: EBMLMaxIDLength can be greater than 8 https://datatracker.ietf.org/doc/html/rfc8794#section-11.2.4