-use constant {
- BROTLI_OPERATION_PROCESS => 0,
- BROTLI_OPERATION_FLUSH => 1,
- BROTLI_OPERATION_FINISH => 2
-};
-sub compress {
- my ($self, $data) = @_;
- BrotliEncoderCompressStream($$self, $data, BROTLI_OPERATION_PROCESS )
-}
-
-sub flush {
- my ($self) = @_;
- BrotliEncoderCompressStream($$self, '', BROTLI_OPERATION_FLUSH )
-}
-
-sub finish {
- my ($self) = @_;
- BrotliEncoderCompressStream($$self, '', BROTLI_OPERATION_FINISH )
-}
-
-# Untested, probably not working
-sub set_dictionary {
- my ($self, $dict) = @_;
- BrotliEncoderSetCustomDictionary($$self, $dict)
-}