Image container that streams like video
ZIP and CBZ require the full file before rendering anything. Bunle doesn't.
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/nghyane/mcz/main/install.sh | sh
# Windows
irm https://raw.githubusercontent.com/nghyane/mcz/main/install.ps1 | iex
# or build from source
cargo install bunle
bunle pack ./images -o gallery.bnl -q 80
bunle info gallery.bnl
bunle extract gallery.bnl 0 -o cover.webp
let data = std::fs::read("gallery.bnl")?;
let index = bunle::read_index(&data)?;
let page = bunle::extract_page(&data, &index, 0)?;
npm i @nghyane/bunle
import { Bunle } from "@nghyane/bunle";
const bnl = await Bunle.open(url);
const blob = await bnl.blob(0);
document.querySelector("img").src = URL.createObjectURL(blob);
for await (const { index, blob } of bnl.stream()) {
document.querySelectorAll("img")[index].src = URL.createObjectURL(blob);
}
bnl.close();
src/ Rust CLI + library
js/ TypeScript browser SDK
site/ Website (Astro + Tailwind v4)