Skip to content

PixuBest compression under TECR

Contextual Reconstructive Entropy · PIXU format · Zero dependencies · TypeScript

Pixu

Quick Start ​

bash
npm install @pantanal/pixu
typescript
import { compress, buildDownloadName } from '@pantanal/pixu';

const result = await compress(file, {
  format: 'image/pixu',
  enableSmartQuality: true,
  stripMetadata: true,
});

console.log(result.compressionRatio);
console.log(buildDownloadName('photo', result.format)); // photo.webp or photo.jpg

Theory ​

Pixu minimizes shipped bytes under Contextual Reconstructive Entropy — L(x∣M,C,ε) — not a claim to beat Shannon losslessly.

Try It Live ​

Pick a sample photo or upload your own — same layout as the framework examples.

Try it live

Pick a sample or upload your own image

Try a sample image

Vue component — live

PixuCompressor with real sample images

Click or drag image here to compress

Supports JPEG, PNG, WEBP, AVIF, PIXU

Framework Examples ​

FrameworkPortCommand
Vue 33000cd examples/vue && npm run dev
React3001cd examples/react && npm run dev
Angular4200cd examples/angular && npm start
Svelte3002cd examples/svelte && npm run dev
Jacaré3003cd examples/jacare && npm run dev

Build the library first: npm run build from the repo root.

View all framework examples →

Documentation Map ​

Released under the MIT License.