shrink 0.5.3 發布,多種壓縮算法的統一API

jopen 11年前發布 | 9K 次閱讀 shrink

shrink庫為多種壓縮算法提供了一個單一的API。它使開發人員能夠輕松地為現有代碼庫添加壓縮和解壓功能。它目前支持LZO,LZ77和LZMA。

        if (s_init(S_ALG_LZO, S_L_MID))
                errx(1, "s_init algorithm %d not supported", algo);

    /* compress */
    if (s_compress(source, destination, size, &comp_sz, NULL)) {
            errx(1, "s_compress failed");

    /* decompress */
    if (s_decompress(source, destination, comp_sz, &uncomp_sz, NULL))
            errx(1, "s_decompress failed");</pre><br />

發布說明: This release fixes the OpenBSD port Makefile for modern OpenBSD ports.

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!