import { ByteVector } from "../byteVector"; import { File, ReadStyle } from "../file"; import { IFileAbstraction } from "../fileAbstraction"; import { Properties } from "../properties"; import { Tag, TagTypes } from "../tag"; /** * This class extends {@link File} to provide tagging and properties support for RIFF files. These * are usually WAV and AVI file. * @remarks * The RIFF standard supports a general purpose "chunk" system that software can use for * whatever purpose. Tagging is accomplished using various types of chunks */ export default class RiffFile extends File { /** * Identifier at the beginning of a RIFF file. */ static readonly FILE_IDENTIFIER: ByteVector; private _fileType; private _properties; private _rawChunks; private _riffSize; private _tag; private _taggingChunkIndexes; /** * Constructs and initializes a new instance of a RIFF file based on the provided file/file path. * @param file File abstraction or path to a file to open as a RIFF file * @param propertiesStyle How in-depth to read the properties of the file */ constructor(file: IFileAbstraction | string, propertiesStyle: ReadStyle); /** @inheritDoc */ get properties(): Properties; /** @inheritDoc */ get tag(): Tag; /** @inheritDoc */ getTag(type: TagTypes, create: boolean): Tag; /** @inheritDoc */ removeTags(types: TagTypes): void; /** @inheritDoc */ save(): void; private read; private readProperties; private updateChunkPositions; private updateTaggingChunkIndexes; }