@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
20 lines (18 loc) • 503 B
JavaScript
export class Codec {
/**
*
* @param {Uint8Array} data
* @returns {Promise<{data:Uint8Array, width:number, height:number}>}
*/
async decode(data) {
throw new Error('Unsupported Operation');
}
/**
* Whether codec is able to decode this data, typically checks headers in the data
* @param {Uint8Array} data
* @return {Promise<boolean>} true if able, false otherwise
*/
async test(data) {
return true;
}
}