Skip to content

Commit 7c2500f

Browse files
committed
register cmpC Box
1 parent 6cd6fda commit 7c2500f

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

entries/all-boxes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export * from '#/boxes/clap';
1010
export * from '#/boxes/clli';
1111
export * from '#/boxes/cmex';
1212
export * from '#/boxes/cmin';
13+
export * from '#/boxes/cmpC';
1314
export * from '#/boxes/cmpd';
1415
export * from '#/boxes/co64';
1516
export * from '#/boxes/CoLL';

src/boxes/cmpC.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { FullBox } from '#/box';
2+
import type { MultiBufferStream } from '#/buffer';
3+
4+
export class cmpCBox extends FullBox {
5+
static override readonly fourcc = 'cmpC' as const;
6+
box_name = 'CompressionConfigurationBox' as const;
7+
8+
version: number;
9+
flags: number;
10+
compression_type: string;
11+
compressed_unit_type: number;
12+
13+
parse(stream: MultiBufferStream) {
14+
this.parseFullHeader(stream);
15+
this.compression_type = stream.readString(4);
16+
this.compressed_unit_type = stream.readUint8();
17+
}
18+
}

0 commit comments

Comments
 (0)