djvu-rs 0.28.0 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -6
- package/package.json +1 -1
- package/scalar/README.md +19 -6
- package/scalar/djvu_rs_bg.wasm +0 -0
- package/simd128/README.md +19 -6
- package/simd128/djvu_rs_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# djvu-rs
|
|
2
2
|
|
|
3
3
|
[](https://crates.io/crates/djvu-rs)
|
|
4
|
+
[](https://pypi.org/project/djvu-rs/)
|
|
5
|
+
[](https://www.npmjs.com/package/djvu-rs)
|
|
4
6
|
[](https://docs.rs/djvu-rs)
|
|
5
7
|
[](https://github.com/matyushkin/djvu-rs/actions/workflows/ci.yml)
|
|
6
8
|
[](https://matyushkin.github.io/djvu-rs/dev/bench/)
|
|
@@ -8,8 +10,10 @@
|
|
|
8
10
|
[](LICENSE)
|
|
9
11
|
|
|
10
12
|
Read, render, convert, and create DjVu files. Pure-Rust library with a CLI,
|
|
11
|
-
WebAssembly, and Python bindings —
|
|
12
|
-
|
|
13
|
+
WebAssembly, and Python bindings — on [crates.io](https://crates.io/crates/djvu-rs),
|
|
14
|
+
[PyPI](https://pypi.org/project/djvu-rs/), and [npm](https://www.npmjs.com/package/djvu-rs)
|
|
15
|
+
as `djvu-rs`. MIT licensed, no GPL dependencies, written from the public DjVu v3
|
|
16
|
+
specification.
|
|
13
17
|
|
|
14
18
|
| Your task | How |
|
|
15
19
|
|-----------|-----|
|
|
@@ -17,7 +21,7 @@ from the public DjVu v3 specification.
|
|
|
17
21
|
| Extract text (plain, hOCR, ALTO XML) | [`djvu text`](#cli) or [`page.text()`](#text-extraction), [`to_hocr` / `to_alto`](#hocr-and-alto-xml-export) |
|
|
18
22
|
| Render pages to RGBA pixels | [`render_pixmap`](#quick-start) — sync, [async](#async-render), or [parallel](#feature-flags) |
|
|
19
23
|
| Show DjVu in the browser | [WebAssembly bindings](#webassembly), incl. lazy HTTP-Range loading |
|
|
20
|
-
| Read DjVu from Python | [PyO3 bindings
|
|
24
|
+
| Read DjVu from Python | `pip install djvu-rs` — [PyO3 bindings](#python) |
|
|
21
25
|
| Create DjVu from images (PNG/JPEG/TIFF) | [`djvu encode`](#cli) or [`PageEncoder`](#encoding--low-level-api) |
|
|
22
26
|
| Add an OCR text layer to a scan | [`djvu ocr`](#ocr-recognition-backends) (Tesseract) |
|
|
23
27
|
| Merge, split, edit documents | [`djvu merge` / `djvu split`](#cli), `DocumentEditor`, `DjVuDocumentMut` |
|
|
@@ -155,6 +159,12 @@ djvu encode scan.png --quality quality --binarization sauvola --bg-inpaint --out
|
|
|
155
159
|
# Cap the IW44 background at a bits-per-pixel budget (smaller file, lower quality)
|
|
156
160
|
djvu encode scan.jpg --quality quality --bg-bpp 0.8 --output scan.djvu
|
|
157
161
|
|
|
162
|
+
# Composite transparent PNG/TIFF pixels onto a solid colour (hex or white/black)
|
|
163
|
+
djvu encode logo.png --background white --output logo.djvu
|
|
164
|
+
|
|
165
|
+
# Refuse ICC-profiled input instead of silently dropping the profile
|
|
166
|
+
djvu encode scan.png --icc reject --output scan.djvu
|
|
167
|
+
|
|
158
168
|
# Encode a directory of images into a bundled DJVM with shared Djbz
|
|
159
169
|
djvu encode pages/ --output book.djvu --shared-dict-pages 2
|
|
160
170
|
|
|
@@ -666,8 +676,9 @@ Honest boundaries, so you can decide fast:
|
|
|
666
676
|
|
|
667
677
|
- **Library + CLI, not a viewer.** There is no GUI; the WASM demo is the
|
|
668
678
|
closest thing to one.
|
|
669
|
-
- **Python bindings
|
|
670
|
-
|
|
679
|
+
- **Python bindings cover the reading surface only.** Open, render, and text
|
|
680
|
+
extraction ship in the PyPI wheels; encode, mutation, and PDF/EPUB/TIFF
|
|
681
|
+
export stay on the Rust crate / CLI for now.
|
|
671
682
|
- **Indirect DJVM mutation is indirect-only via two paths.**
|
|
672
683
|
`DjVuDocumentMut::from_bytes` + `page_mut` on an indirect index errors;
|
|
673
684
|
use `from_indirect_resolved` (rebundles) or `IndirectRewritePlan` (rewrites
|
|
@@ -797,7 +808,9 @@ MIT. See [LICENSE](LICENSE).
|
|
|
797
808
|
|
|
798
809
|
Written from the public DjVu v3 specification:
|
|
799
810
|
- https://www.sndjvu.org/spec.html
|
|
800
|
-
- https://
|
|
811
|
+
- https://web.archive.org/web/20251005122807/http://www.djvu.org/docs/DjVu3Spec.djvu
|
|
812
|
+
(the spec is itself a DjVu file; archived copy — djvu.org and
|
|
813
|
+
djvu.sourceforge.net no longer serve the original)
|
|
801
814
|
|
|
802
815
|
No code derived from GPL-licensed DjVuLibre or any other GPL source.
|
|
803
816
|
All algorithms are independent implementations from the spec.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "djvu-rs",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "Read, render, convert, and create DjVu files. Pure-Rust DjVu decoder/encoder with CLI, WebAssembly, and Python bindings. DjVu to PDF, EPUB, TIFF, PNG, and text. MIT licensed, no GPL dependencies.",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.30.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
package/scalar/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# djvu-rs
|
|
2
2
|
|
|
3
3
|
[](https://crates.io/crates/djvu-rs)
|
|
4
|
+
[](https://pypi.org/project/djvu-rs/)
|
|
5
|
+
[](https://www.npmjs.com/package/djvu-rs)
|
|
4
6
|
[](https://docs.rs/djvu-rs)
|
|
5
7
|
[](https://github.com/matyushkin/djvu-rs/actions/workflows/ci.yml)
|
|
6
8
|
[](https://matyushkin.github.io/djvu-rs/dev/bench/)
|
|
@@ -8,8 +10,10 @@
|
|
|
8
10
|
[](LICENSE)
|
|
9
11
|
|
|
10
12
|
Read, render, convert, and create DjVu files. Pure-Rust library with a CLI,
|
|
11
|
-
WebAssembly, and Python bindings —
|
|
12
|
-
|
|
13
|
+
WebAssembly, and Python bindings — on [crates.io](https://crates.io/crates/djvu-rs),
|
|
14
|
+
[PyPI](https://pypi.org/project/djvu-rs/), and [npm](https://www.npmjs.com/package/djvu-rs)
|
|
15
|
+
as `djvu-rs`. MIT licensed, no GPL dependencies, written from the public DjVu v3
|
|
16
|
+
specification.
|
|
13
17
|
|
|
14
18
|
| Your task | How |
|
|
15
19
|
|-----------|-----|
|
|
@@ -17,7 +21,7 @@ from the public DjVu v3 specification.
|
|
|
17
21
|
| Extract text (plain, hOCR, ALTO XML) | [`djvu text`](#cli) or [`page.text()`](#text-extraction), [`to_hocr` / `to_alto`](#hocr-and-alto-xml-export) |
|
|
18
22
|
| Render pages to RGBA pixels | [`render_pixmap`](#quick-start) — sync, [async](#async-render), or [parallel](#feature-flags) |
|
|
19
23
|
| Show DjVu in the browser | [WebAssembly bindings](#webassembly), incl. lazy HTTP-Range loading |
|
|
20
|
-
| Read DjVu from Python | [PyO3 bindings
|
|
24
|
+
| Read DjVu from Python | `pip install djvu-rs` — [PyO3 bindings](#python) |
|
|
21
25
|
| Create DjVu from images (PNG/JPEG/TIFF) | [`djvu encode`](#cli) or [`PageEncoder`](#encoding--low-level-api) |
|
|
22
26
|
| Add an OCR text layer to a scan | [`djvu ocr`](#ocr-recognition-backends) (Tesseract) |
|
|
23
27
|
| Merge, split, edit documents | [`djvu merge` / `djvu split`](#cli), `DocumentEditor`, `DjVuDocumentMut` |
|
|
@@ -155,6 +159,12 @@ djvu encode scan.png --quality quality --binarization sauvola --bg-inpaint --out
|
|
|
155
159
|
# Cap the IW44 background at a bits-per-pixel budget (smaller file, lower quality)
|
|
156
160
|
djvu encode scan.jpg --quality quality --bg-bpp 0.8 --output scan.djvu
|
|
157
161
|
|
|
162
|
+
# Composite transparent PNG/TIFF pixels onto a solid colour (hex or white/black)
|
|
163
|
+
djvu encode logo.png --background white --output logo.djvu
|
|
164
|
+
|
|
165
|
+
# Refuse ICC-profiled input instead of silently dropping the profile
|
|
166
|
+
djvu encode scan.png --icc reject --output scan.djvu
|
|
167
|
+
|
|
158
168
|
# Encode a directory of images into a bundled DJVM with shared Djbz
|
|
159
169
|
djvu encode pages/ --output book.djvu --shared-dict-pages 2
|
|
160
170
|
|
|
@@ -666,8 +676,9 @@ Honest boundaries, so you can decide fast:
|
|
|
666
676
|
|
|
667
677
|
- **Library + CLI, not a viewer.** There is no GUI; the WASM demo is the
|
|
668
678
|
closest thing to one.
|
|
669
|
-
- **Python bindings
|
|
670
|
-
|
|
679
|
+
- **Python bindings cover the reading surface only.** Open, render, and text
|
|
680
|
+
extraction ship in the PyPI wheels; encode, mutation, and PDF/EPUB/TIFF
|
|
681
|
+
export stay on the Rust crate / CLI for now.
|
|
671
682
|
- **Indirect DJVM mutation is indirect-only via two paths.**
|
|
672
683
|
`DjVuDocumentMut::from_bytes` + `page_mut` on an indirect index errors;
|
|
673
684
|
use `from_indirect_resolved` (rebundles) or `IndirectRewritePlan` (rewrites
|
|
@@ -797,7 +808,9 @@ MIT. See [LICENSE](LICENSE).
|
|
|
797
808
|
|
|
798
809
|
Written from the public DjVu v3 specification:
|
|
799
810
|
- https://www.sndjvu.org/spec.html
|
|
800
|
-
- https://
|
|
811
|
+
- https://web.archive.org/web/20251005122807/http://www.djvu.org/docs/DjVu3Spec.djvu
|
|
812
|
+
(the spec is itself a DjVu file; archived copy — djvu.org and
|
|
813
|
+
djvu.sourceforge.net no longer serve the original)
|
|
801
814
|
|
|
802
815
|
No code derived from GPL-licensed DjVuLibre or any other GPL source.
|
|
803
816
|
All algorithms are independent implementations from the spec.
|
package/scalar/djvu_rs_bg.wasm
CHANGED
|
Binary file
|
package/simd128/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# djvu-rs
|
|
2
2
|
|
|
3
3
|
[](https://crates.io/crates/djvu-rs)
|
|
4
|
+
[](https://pypi.org/project/djvu-rs/)
|
|
5
|
+
[](https://www.npmjs.com/package/djvu-rs)
|
|
4
6
|
[](https://docs.rs/djvu-rs)
|
|
5
7
|
[](https://github.com/matyushkin/djvu-rs/actions/workflows/ci.yml)
|
|
6
8
|
[](https://matyushkin.github.io/djvu-rs/dev/bench/)
|
|
@@ -8,8 +10,10 @@
|
|
|
8
10
|
[](LICENSE)
|
|
9
11
|
|
|
10
12
|
Read, render, convert, and create DjVu files. Pure-Rust library with a CLI,
|
|
11
|
-
WebAssembly, and Python bindings —
|
|
12
|
-
|
|
13
|
+
WebAssembly, and Python bindings — on [crates.io](https://crates.io/crates/djvu-rs),
|
|
14
|
+
[PyPI](https://pypi.org/project/djvu-rs/), and [npm](https://www.npmjs.com/package/djvu-rs)
|
|
15
|
+
as `djvu-rs`. MIT licensed, no GPL dependencies, written from the public DjVu v3
|
|
16
|
+
specification.
|
|
13
17
|
|
|
14
18
|
| Your task | How |
|
|
15
19
|
|-----------|-----|
|
|
@@ -17,7 +21,7 @@ from the public DjVu v3 specification.
|
|
|
17
21
|
| Extract text (plain, hOCR, ALTO XML) | [`djvu text`](#cli) or [`page.text()`](#text-extraction), [`to_hocr` / `to_alto`](#hocr-and-alto-xml-export) |
|
|
18
22
|
| Render pages to RGBA pixels | [`render_pixmap`](#quick-start) — sync, [async](#async-render), or [parallel](#feature-flags) |
|
|
19
23
|
| Show DjVu in the browser | [WebAssembly bindings](#webassembly), incl. lazy HTTP-Range loading |
|
|
20
|
-
| Read DjVu from Python | [PyO3 bindings
|
|
24
|
+
| Read DjVu from Python | `pip install djvu-rs` — [PyO3 bindings](#python) |
|
|
21
25
|
| Create DjVu from images (PNG/JPEG/TIFF) | [`djvu encode`](#cli) or [`PageEncoder`](#encoding--low-level-api) |
|
|
22
26
|
| Add an OCR text layer to a scan | [`djvu ocr`](#ocr-recognition-backends) (Tesseract) |
|
|
23
27
|
| Merge, split, edit documents | [`djvu merge` / `djvu split`](#cli), `DocumentEditor`, `DjVuDocumentMut` |
|
|
@@ -155,6 +159,12 @@ djvu encode scan.png --quality quality --binarization sauvola --bg-inpaint --out
|
|
|
155
159
|
# Cap the IW44 background at a bits-per-pixel budget (smaller file, lower quality)
|
|
156
160
|
djvu encode scan.jpg --quality quality --bg-bpp 0.8 --output scan.djvu
|
|
157
161
|
|
|
162
|
+
# Composite transparent PNG/TIFF pixels onto a solid colour (hex or white/black)
|
|
163
|
+
djvu encode logo.png --background white --output logo.djvu
|
|
164
|
+
|
|
165
|
+
# Refuse ICC-profiled input instead of silently dropping the profile
|
|
166
|
+
djvu encode scan.png --icc reject --output scan.djvu
|
|
167
|
+
|
|
158
168
|
# Encode a directory of images into a bundled DJVM with shared Djbz
|
|
159
169
|
djvu encode pages/ --output book.djvu --shared-dict-pages 2
|
|
160
170
|
|
|
@@ -666,8 +676,9 @@ Honest boundaries, so you can decide fast:
|
|
|
666
676
|
|
|
667
677
|
- **Library + CLI, not a viewer.** There is no GUI; the WASM demo is the
|
|
668
678
|
closest thing to one.
|
|
669
|
-
- **Python bindings
|
|
670
|
-
|
|
679
|
+
- **Python bindings cover the reading surface only.** Open, render, and text
|
|
680
|
+
extraction ship in the PyPI wheels; encode, mutation, and PDF/EPUB/TIFF
|
|
681
|
+
export stay on the Rust crate / CLI for now.
|
|
671
682
|
- **Indirect DJVM mutation is indirect-only via two paths.**
|
|
672
683
|
`DjVuDocumentMut::from_bytes` + `page_mut` on an indirect index errors;
|
|
673
684
|
use `from_indirect_resolved` (rebundles) or `IndirectRewritePlan` (rewrites
|
|
@@ -797,7 +808,9 @@ MIT. See [LICENSE](LICENSE).
|
|
|
797
808
|
|
|
798
809
|
Written from the public DjVu v3 specification:
|
|
799
810
|
- https://www.sndjvu.org/spec.html
|
|
800
|
-
- https://
|
|
811
|
+
- https://web.archive.org/web/20251005122807/http://www.djvu.org/docs/DjVu3Spec.djvu
|
|
812
|
+
(the spec is itself a DjVu file; archived copy — djvu.org and
|
|
813
|
+
djvu.sourceforge.net no longer serve the original)
|
|
801
814
|
|
|
802
815
|
No code derived from GPL-licensed DjVuLibre or any other GPL source.
|
|
803
816
|
All algorithms are independent implementations from the spec.
|
package/simd128/djvu_rs_bg.wasm
CHANGED
|
Binary file
|