vitemple / docs
TOOLS / FILE PACKS

Vitemple Packer

Images, sounds, and data. Pack your files into one .vpack or open an existing pack to download its contents. Original bytes, no compression.

No files selected

    .vpack

    Choose files to get started.

    Files stay on your device. Images show a small preview when unpacked. Download all may be limited by your browser; individual download links remain available.

    01

    Read packs in your app

    Import fetchFilePack to load a pack from a URL, or readFilePack to open a selected File or Blob. Each file is returned as { name, blob } , with its original MIME type. Neither method saves files to disk.

    Fetch a pack
    import { fetchFilePack } from "vitemple/file-pack";
    
    for await (const { name, blob } of fetchFilePack("./files.vpack")) {
      console.log(name, blob);
    }
    Read a selected file
    import { readFilePack } from "vitemple/file-pack";
    
    const file = document.querySelector('input[type="file"]').files[0];
    
    for await (const { name, blob } of readFilePack(file)) {
      console.log(name, blob);
    }

    Use URL.createObjectURL(blob) as an image source and revoke it when no longer needed. For Base64 with a MIME prefix, FileReader.readAsDataURL(blob) uses the restored blob.type automatically.

    Explore the complete example ↗