/** @packageDocumentation Synchsafe integer encoding and decoding utilities for ID3v2 tags. */ import { ByteVector } from "../../byteVector.js"; /** * Synchsafe integer encoding/decoding for ID3v2. * * ID3v2 uses "synchsafe integers" where the most significant bit of each byte * is always zero, giving 7 bits of data per byte. This avoids false MPEG sync * signals (0xFF followed by a byte with bit 7 set) in the tag data. */ export declare class SynchData { /** * Decode a synchsafe integer to a normal unsigned number. * Each byte contributes 7 bits. Up to 4 bytes are read (28 bits of data). * * If any byte has bit 7 set, the data is assumed to have been written by * buggy software as a normal big-endian integer and is decoded accordingly. */ static toUInt(data: ByteVector): number; /** * Encode a normal unsigned number to a 4-byte synchsafe ByteVector. */ static fromUInt(value: number): ByteVector; /** * Decode synchsafe data by removing false sync bytes. * Any 0x00 byte following a 0xFF byte is stripped out. */ static decode(data: ByteVector): ByteVector; /** * Encode data to synchsafe form by inserting a 0x00 byte after every 0xFF. */ static encode(data: ByteVector): ByteVector; } //# sourceMappingURL=id3v2SynchData.d.ts.map