diff --git a/entries/all-boxes.ts b/entries/all-boxes.ts index c468da0b..ad26e44d 100644 --- a/entries/all-boxes.ts +++ b/entries/all-boxes.ts @@ -10,6 +10,7 @@ export * from '#/boxes/clap'; export * from '#/boxes/clli'; export * from '#/boxes/cmex'; export * from '#/boxes/cmin'; +export * from '#/boxes/cmpC'; export * from '#/boxes/cmpd'; export * from '#/boxes/co64'; export * from '#/boxes/CoLL'; diff --git a/src/boxes/cmpC.ts b/src/boxes/cmpC.ts new file mode 100644 index 00000000..f6d6895f --- /dev/null +++ b/src/boxes/cmpC.ts @@ -0,0 +1,18 @@ +import { FullBox } from '#/box'; +import type { MultiBufferStream } from '#/buffer'; + +export class cmpCBox extends FullBox { + static override readonly fourcc = 'cmpC' as const; + box_name = 'CompressionConfigurationBox' as const; + + version: number; + flags: number; + compression_type: string; + compressed_unit_type: number; + + parse(stream: MultiBufferStream) { + this.parseFullHeader(stream); + this.compression_type = stream.readString(4); + this.compressed_unit_type = stream.readUint8(); + } +}