/** @packageDocumentation ID3v2 tag header parser and renderer (the mandatory 10-byte header found at the start of every ID3v2 tag). */ import { ByteVector } from "../../byteVector.js"; /** * 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) */ export declare class Id3v2Header { /** The ID3v2 major version number (2, 3, or 4). */ private _majorVersion; /** The ID3v2 revision number (typically 0). */ private _revisionNumber; /** Whether the tag body has been unsynchronised (whole-tag, v2.3 style). */ private _unsynchronisation; /** Whether an extended header follows the main header. */ private _extendedHeader; /** Whether the tag is in an experimental stage. */ private _experimentalIndicator; /** Whether a footer is appended at the end of the tag (v2.4 only). */ private _footerPresent; /** Size of the tag body in bytes, encoded as a synchsafe integer (excludes header and footer). */ private _tagSize; /** Header is always 10 bytes. */ static readonly size: number; /** The file identifier "ID3". */ static readonly fileIdentifier: ByteVector; /** Creates a new `Id3v2Header` with default values (version 4, no flags, zero size). */ constructor(); /** * Parse a 10-byte ByteVector into an Id3v2Header. * Returns null if the data is invalid. */ static parse(data: ByteVector): Id3v2Header | null; /** * Gets the ID3v2 major version number (2, 3, or 4). */ get majorVersion(): number; /** * Sets the ID3v2 major version number. * @param v - The major version (2, 3, or 4). */ set majorVersion(v: number); /** * Gets the ID3v2 revision number (typically 0). */ get revisionNumber(): number; /** * Gets the size of the tag body in bytes (excluding the header and footer). */ get tagSize(): number; /** * Sets the size of the tag body in bytes. * @param v - The tag body size. */ set tagSize(v: number); /** * Gets whether the tag body has been unsynchronised. */ get unsynchronisation(): boolean; /** * Gets whether an extended header is present after the main header. */ get extendedHeader(): boolean; /** * Gets whether the experimental indicator flag is set. */ get experimentalIndicator(): boolean; /** * Gets whether a footer is present at the end of the tag (v2.4 only). */ get footerPresent(): boolean; /** * Total tag size including the header and optional footer. */ get completeTagSize(): number; /** * 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). */ render(): ByteVector; } //# sourceMappingURL=id3v2Header.d.ts.map