ereader-reencodelisted
Install: claude install-skill romain-nicod/kickoff
# Re-encoding books for an E Ink reader
## The one thing to understand first
**The bottleneck is not file size, it is decode cost per page.** These pull in
opposite directions, and getting this backwards undoes the whole job.
A source file is small on disk *because it pushes the work onto the reader*. An
Internet Archive scan fits 5 megapixels into 17 KB — as JPEG 2000, decoded by
wavelet transform, with a separate JBIG2 mask to decode and compose on top. The
compression is spectacular; the price is paid on every page turn.
Output files are therefore **often larger on disk and three to ten times cheaper
to display**: baseline JPEG, sized to the panel, one greyscale channel where the
book is monochrome, no mask.
⚠️ **Never "re-optimise" an output file to make it smaller.** That recreates the
problem.
## Workflow
1. **Ask which device** if the user has not said. It changes the target size.
Run `python scripts/reencode.py --list-devices` to show the profiles.
2. **Look at what was given.** Report the classification before converting, so
the user can correct you — especially any file detected as `text`.
3. **Run the script**, one command per book when titles matter.
4. **Report** the before/after table and hand back the files.
```bash
python scripts/reencode.py "book.pdf" --device era-color --out reencoded
python scripts/reencode.py "book.pdf" --device inkpad-color-3 \
--title "Mon ballon" --author "Mario Ramos" --publisher "L'École des loisirs"
```
Requires **