import * as Token from 'token-types' ; import { IGetToken } from 'strtok3/lib/core' ; import { IChunkHeader } from '../iff' ; export { IChunkHeader } from '../iff' ; /**
 * Common RIFF chunk header
 */ export const Header = { len : 8 , get : ( buf , off ) : IChunkHeader => { return { chunkID : buf . toString ( 'binary' , off , off + 4 ) , chunkSize : Token . UINT32_LE . get ( buf , 4 ) } ; } } ; /**
 * Token to parse RIFF-INFO tag value
 */ export class ListInfoTagValue implements IGetToken < string > { public len : number ; public constructor ( private tagHeader ) { this . len = tagHeader . chunkSize ; this . len += this . len & 1 ; } public get ( buf , off ) { return new Token . StringType ( this . tagHeader . chunkSize , 'ascii' ) . get ( buf , off ) ; } }