EPUB Crush
Compresses EPUB files to reduce size.
By default, all images, fonts, scipts, and styles will be removed from the EPUB.
Installation
This package is available via PyPI and can be installed from there.
pip install epubcrush
Performance
| File | Original | txt | txtz | Images q=100 | Images q=50 | No Images |
|---|---|---|---|---|---|---|
| 1 | 589kB | 27kB | 11kB | 583kB (99%) | 256kB (43%) | 26kB ( 4%) |
| 2 | 589kB | 91kB | 31kB | 583kB (99%) | 284kB (48%) | 46kB ( 8%) |
| 3 | 87kB | 89kB | 34kB | 76kB (87%) | 50kB (57%) | 39kB (45%) |
Why?
EPUBs may include features that may not be desirable from a privacy or efficiency standpoint. Publishers may choose to include high-res images, custom fonts, styles, scripts, and other features that bloat the size of EPUBs beyond what is needed for the text content of a book. This application strips away everything but the plain text content.
Why not use plain text?
EPUB adds a number of useful reading features (table of contents, metadata, etc) that are useful and not available in basic plain text. EPUBs are also compressed, so they will often be smaller than simple plain text.
Method of Operation
- Iterate files in container
- Remove all files that are not part of the document text or part of the EPUB structure
- Parse XML files
- Remove the following tags
- link
- meta
- style
- img
- picture
- audio
- video
- script
- Remove the following tags
- Parse opf file removing references to files that no longer exist
- Remove print page lists
Metadata
Release files for epubcrush 7.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| epubcrush-7.0.0.tar.gz | 9.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| epubcrush-7.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.6 kB
Release files / epubcrush-7.0.0.tar.gz
| Download URL | epubcrush-7.0.0.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c10d612ff9efe9e7d56ac7b7645163c90bd9b14289102fdf214ea3c823b8e13e
|
|
BLAKE2b-256 checksum How to use checksums |
82a2890acfe5086302f0c265486e3d2119b94339d10b6c375113a5fa96cb4f1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / epubcrush-7.0.0-py3-none-any.whl
| Download URL | epubcrush-7.0.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1772e52b6362a8c2015749295018f2972883802524baa24ea91432b9285e6911
|
|
BLAKE2b-256 checksum How to use checksums |
0b2bbe1cf9c66c6d98e8196a51b59ab1a10ed8dbba688dafa00c5138bb96b70c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for epubcrush 7.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.