id3v2

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const HeaderSize = 10

Variables

View Source
var (
	ErrHeaderTooShort = errors.New("id3 header too short")
	ErrInvalidHeader  = errors.New("invalid id3 header")
)

Functions

func DecodeSyncSafeInt

func DecodeSyncSafeInt(buffer []byte) int

func EncodeSyncSafeInt

func EncodeSyncSafeInt(value int) []byte

func Marshal

func Marshal(bundle metadata.Bundle, opts MarshalOptions) ([]byte, error)

func Parse

func Parse(buffer []byte, bundle *metadata.Bundle)

func Skip

func Skip(r io.Reader) (int, error)

Types

type Encoding

type Encoding byte
const (
	EncodingISO88591 Encoding = 0x00
	EncodingUTF16    Encoding = 0x01
	EncodingUTF16BE  Encoding = 0x02
	EncodingUTF8     Encoding = 0x03
	EncodingDefault  Encoding = EncodingISO88591
)
type Header struct {
	VersionMajor    byte
	VersionRevision byte
	Flags           byte
	TagSize         int
}

func ParseHeader

func ParseHeader(buffer []byte) (Header, error)

func (Header) HasFooter

func (h Header) HasFooter() bool

func (Header) TotalSize

func (h Header) TotalSize() int

type MarshalOptions

type MarshalOptions struct {
	Version  Version
	Encoding Encoding
}

type Version

type Version byte
const (
	Version2 Version = 2
	Version3 Version = 3
	Version4 Version = 4
)

Jump to

Keyboard shortcuts

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