CCSDS 122.0-B Image Data Compression
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocaml-idc: bind image_data and fix wavelet bullet typo

The Usage block referenced [image_data] as a free variable; bind a
zeroed buffer and assert the round-trip. The features list also had
a stray newline-let token splitting "wavelet" across two lines —
collapse it back to a single bullet.

+6 -8
+6 -8
README.md
··· 12 12 13 13 - Integer 5/3 wavelet (Le Gall) for lossless compression 14 14 - Float 9/7 wavelet (CDF 9/7) for lossy compression 15 - - Multi-level 2D discrete wave 16 - let transform via lifting scheme 15 + - Multi-level 2D discrete wavelet transform via lifting scheme 17 16 - Bit-plane encoder with significance and refinement passes 18 17 - Progressive quality: partial bitstreams yield lower-quality reconstructions 19 18 ··· 39 38 ## Usage 40 39 41 40 ```ocaml 42 - (* Compress a grayscale image *) 43 - let compressed = 44 - Idc.compress ~wavelet:`Int_5_3 ~width:256 ~height:256 image_data 41 + (* Compress + decompress a 256x256 grayscale image. *) 42 + let image_data = Bytes.make (256 * 256) '\x00' 45 43 46 - (* Decompress *) 47 - let restored = 48 - Idc.decompress ~width:256 ~height:256 compressed 44 + let compressed = Idc.compress ~wavelet:`Int_5_3 ~width:256 ~height:256 image_data 45 + let restored = Idc.decompress ~width:256 ~height:256 compressed 46 + let () = assert (Bytes.equal restored image_data) 49 47 ``` 50 48 51 49 ## Licence