taglib-ts
    Preparing search index...

    ID3v2 tag header (10 bytes).

    Structure (from the ID3v2.4.0 specification, section 3.1): Bytes 0-2: File identifier "ID3" Byte 3: Major version (2, 3, or 4) Byte 4: Revision number Byte 5: Flags Bit 7 (0x80): Unsynchronisation Bit 6 (0x40): Extended header Bit 5 (0x20): Experimental indicator Bit 4 (0x10): Footer present (v2.4 only) Bytes 6-9: Tag size as synchsafe integer (excludes header and footer)

    Index

    Constructors

    Properties

    fileIdentifier: ByteVector = ...

    The file identifier "ID3".

    size: number = 10

    Header is always 10 bytes.

    Accessors

    • get extendedHeader(): boolean

      Gets whether an extended header is present after the main header.

      Returns boolean

    • get footerPresent(): boolean

      Gets whether a footer is present at the end of the tag (v2.4 only).

      Returns boolean

    • get majorVersion(): number

      Gets the ID3v2 major version number (2, 3, or 4).

      Returns number

    • set majorVersion(v: number): void

      Sets the ID3v2 major version number.

      Parameters

      • v: number

        The major version (2, 3, or 4).

      Returns void

    • get tagSize(): number

      Gets the size of the tag body in bytes (excluding the header and footer).

      Returns number

    • set tagSize(v: number): void

      Sets the size of the tag body in bytes.

      Parameters

      • v: number

        The tag body size.

      Returns void

    Methods

    • Render the header to a 10-byte ByteVector. Always renders as the current major version. Clears extended header, footer, and unsynchronisation flags on write (matching C++ behavior).

      Returns ByteVector