| 1 |
module Codec.Compression.BZip.Foreign.Compress ( bZ2BzCompressInit |
| 2 |
, bZ2BzCompress |
| 3 |
, bZ2BzCompressEnd |
| 4 |
, BzStreamPtr |
| 5 |
) where |
| 6 |
|
| 7 |
{# import Codec.Compression.BZip.Foreign.Common #} |
| 8 |
|
| 9 |
import Foreign.C.Types (CInt) |
| 10 |
|
| 11 |
#include <bzlib.h> |
| 12 |
|
| 13 |
{#pointer *bz_stream as BzStreamPtr foreign finalizer BZ2_bzCompressEnd as ^ -> BzStream #} |
| 14 |
|
| 15 |
{# fun BZ2_bzCompressInit as ^ { `BzStreamPtr', `CInt', `CInt', `CInt' } -> `()' bzWrap*- #} |
| 16 |
{# fun BZ2_bzCompress as ^ { `BzStreamPtr', `BZAction' } -> `BZError' bzWrap* #} |