blob: 2edcc4fb7485202bb55adc8bd7f342f8b1db8f0f (
plain) (
blame)
1
2
3
4
5
6
7
8
|
import crc32 from 'crc/crc32';
onmessage = async (message: MessageEvent<File>) => {
const file = message.data;
const buffer = await file.arrayBuffer();
const crc = crc32(buffer);
postMessage(crc);
};
|