树莓派挂载U盘

su root
fdisk -l

mkdir /mnt/usb_flash

mount /dev/sda4 /mnt/usb_flash/

umount /mnt/usb_flash


nano /etc/fstab
/dev/sda4 /mnt/usb_flash/    auto     defaults,nofail,x-systemd.device-timeout=1,noatime  0   0

pako – zlib.js demo

<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<script src="https://cdn.jsdelivr.net/pako/1.0.3/pako.min.js"></script>

</html>
<body>
<input id="test" type="file"/>
<script>
'use strict';

let fileinput = document.querySelector('#test');
fileinput.onchange = () => {
console.log('read file.');
let file = fileinput.files[0];
let fileReader = new FileReader();
fileReader.readAsArrayBuffer(file);
fileReader.onload = () => {
console.log('start compress.');
let deflate = pako.gzip(fileReader.result, { level: 3});
console.log('end compress.');
console.log(deflate);
}
}

</script>
</body>