add thumb/preview decoding

This commit is contained in:
Stewart Allen 2021-07-26 00:47:35 -04:00
commit 127ca791da
3 changed files with 57 additions and 12 deletions

View file

@ -106,6 +106,12 @@ self.DataReader = class DataReader {
return p;
}
readBytes(len) {
let buf = this.view.buffer.slice(this.pos, this.pos + len);
this.pos += len;
return buf;
}
readU8() {
return this.view.getUint8(this.pos++);
}