lepton-jpeg-python 0.5.5__cp38-cp38-macosx_11_0_arm64.whl

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.
@@ -0,0 +1,5 @@
1
+ from .lepton_jpeg_python import *
2
+
3
+ __doc__ = lepton_jpeg_python.__doc__
4
+ if hasattr(lepton_jpeg_python, "__all__"):
5
+ __all__ = lepton_jpeg_python.__all__
@@ -0,0 +1,63 @@
1
+ Metadata-Version: 2.4
2
+ Name: lepton_jpeg_python
3
+ Version: 0.5.5
4
+ Classifier: Programming Language :: Python :: 3
5
+ Classifier: Programming Language :: Rust
6
+ Classifier: Operating System :: OS Independent
7
+ Summary: Rust port of the Lepton JPEG compression library
8
+ Author-email: Kristof Roomp <kristofr@gmail.com>
9
+ License-Expression: Apache-2.0
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
12
+ Project-URL: Homepage, https://github.com/microsoft/lepton_jpeg_rust
13
+
14
+ # Lepton JPEG Compression
15
+
16
+ This is a port of the C++ Lepton JPEG compression tool that was released by DropBox [dropbox/lepton](https://github.com/dropbox/lepton). We developed a port of the library to Rust, which has basically the same performance characteristics with the advantage of all the safety features that Rust has to offer, due to the work involved in performing an exhaustive security check on the C++ code and the fact that DropBox has deprecated the codebase.
17
+
18
+ With precise bit-by-bit recovery of the original JPEG, the Lepton compression library is designed for lossless compression of baseline and progressive JPEGs up to 22%. JPEG storage in a cloud storage system is the main application case. Even metadata headers and invalid content are kept in good condition.
19
+
20
+
21
+ ## How to Use This Library
22
+
23
+ The library exposes two methods, compress and decompress, which can be invoked as follows:
24
+
25
+ ``` python
26
+
27
+ with open("my image", "rb") as f:
28
+ jpg_data = f.read()
29
+
30
+ config = {"max_jpeg_width": 4096 }
31
+ compressed = lepton_jpeg_python.compress_bytes(jpg_data, config)
32
+ decompressed = lepton_jpeg_python.decompress_bytes(compressed)
33
+
34
+ assert jpg_data == decompressed
35
+ ```
36
+
37
+ The following config options are supported:
38
+ - max_jpeg_width: reject compressing images wider than this
39
+ - max_jpeg_height: reject compressioning images taller than this
40
+ - progressive: false to forbid compressing progressive JPEGs
41
+ - reject_dqts_with_zeros: true if we should reject JPEGs with 0 in their quantitization table
42
+ - max_partitions: maximum number of partitions to split JPEG into in order to allow for parallel compression/decompression
43
+ - max_jpeg_file_size: reject JPEGs larger than this
44
+
45
+ ## Contributing
46
+
47
+ There are many ways in which you can participate in this project, for example:
48
+
49
+ * [Submit bugs and feature requests](https://github.com/microsoft/lepton_jpeg_rust/issues), and help us verify as they are checked in
50
+ * Review [source code changes](https://github.com/microsoft/lepton_jpeg_rust/pulls) or submit your own features as pull requests.
51
+ * The library uses only **stable features**, so if you want to take advantage of SIMD features such as AVX2, use the Wide crate (see the idct.rs as an example) rather than intrinsics.
52
+
53
+ ## Code of Conduct
54
+
55
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
56
+
57
+ ## License
58
+
59
+ Copyright (c) Microsoft Corporation. All rights reserved.
60
+
61
+ Licensed under the [Apache 2.0](LICENSE.txt) license.
62
+
63
+
@@ -0,0 +1,5 @@
1
+ lepton_jpeg_python-0.5.5.dist-info/METADATA,sha256=QamwzfW8Xc8QwIEKhKSKSfPlS3NjGmzoATk_P2IUn-A,3232
2
+ lepton_jpeg_python-0.5.5.dist-info/WHEEL,sha256=pxFDXDgY_pQUKFCmwTzEpHCnpsP8pA2DCA7Bg-ZBju4,102
3
+ lepton_jpeg_python/__init__.py,sha256=-GvHRSJ6Mo84j55jsjARs1PIiRRo-yLDNMEYDRAAXIU,155
4
+ lepton_jpeg_python/lepton_jpeg_python.cpython-38-darwin.so,sha256=0n_7RgZkmpQdJfhqZv2NPJ50uw-kXGIHEhuieo_PPnA,1500952
5
+ lepton_jpeg_python-0.5.5.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.9.6)
3
+ Root-Is-Purelib: false
4
+ Tag: cp38-cp38-macosx_11_0_arm64