Sign in

    justinwongcn/moonpgp/compress does not have a README file

    CompressedAlgo

    pub(all) enum CompressedAlgo {
    Uncompressed
    Zip
    Zlib
    BZip2
    } derive(Eq,
    Debug
    )

    Compression algorithms for the Compressed Data packet (RFC 9580 ยง9.4).

    CompressedAlgo::equal

    CompressedAlgo::not_equal

    fn CompressedAlgo::not_equal(x : CompressedAlgo, y : CompressedAlgo) -> Bool

    CompressedAlgo::number

    fn CompressedAlgo::number(self : CompressedAlgo) -> Int

    compressed_algo_of_number

    fn compressed_algo_of_number(n : Int) -> CompressedAlgo?

    zip_compress

    fn zip_compress(data : BytesView) -> Bytes

    Raw DEFLATE (RFC 1951) โ€” the ZIP algorithm of the Compressed packet.

    zip_decompress

    fn zip_decompress(data : BytesView) -> Bytes raise

    Raw DEFLATE decompression. The decompression end must be complete: incoming mail may arrive compressed with dynamic Huffman tables.

    zip_decompress_capped

    fn zip_decompress_capped(data : BytesView, max_out : Int) -> Bytes raise

    Raw DEFLATE decompression with a hard output cap (M4): flate's limited inflater stops (raising) once the cap is exceeded, so the bomb never materializes.

    zlib_compress

    fn zlib_compress(data : BytesView) -> Bytes

    ZLIB (RFC 1950) wrapper โ€” algorithm 2 of the Compressed packet.

    zlib_decompress

    fn zlib_decompress(data : BytesView) -> Bytes raise

    zlib_decompress_capped

    fn zlib_decompress_capped(data : BytesView, max_out : Int) -> Bytes raise

    ZLIB decompression with a hard output cap (M4): the streaming decoder runs with bounded output windows, so total allocation stays at the cap instead of materializing the payload first. Checksum and framing stay with the decoder.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    ยฉ 2026 mooncakes.io