@omnimedia/omnitool
Version:
open source video processing tools
20 lines • 570 B
JavaScript
import { Checksum } from "./checksum.js";
export class Datafile {
bytes;
filename;
checksum;
constructor(bytes, filename, checksum) {
this.bytes = bytes;
this.filename = filename;
this.checksum = checksum;
}
static async make(bytes, name) {
const checksum = await Checksum.make(bytes);
const filename = name ?? checksum.nickname;
return new this(bytes, filename, checksum);
}
static async load(_path) {
throw new Error("TODO implement");
}
}
//# sourceMappingURL=datafile.js.map