packages feed

zstd-0.1.1.2: zstd.cabal

name:                zstd
version:             0.1.1.2
synopsis:            Haskell bindings to the Zstandard compression algorithm
description:
  A fast lossless compression algorithm, targeting real-time
  compression scenarios at zlib-level and better compression ratios.
homepage:            https://github.com/luispedro/hs-zstd
bug-reports:         https://github.com/luispedro/hs-zstd/issues
license:             BSD3
license-file:        LICENSE
author:              Bryan O'Sullivan
maintainer:          luis@luispedro.org
copyright:           (c) 2016-present, Facebook, Inc. All rights reserved.; 2019 Luis Pedro Coelho
category:            Codec
build-type:          Simple
cabal-version:       >=1.10
extra-source-files:
  *.md
  ChangeLog
  PATENTS
  zstd/*.md
  zstd/LICENSE
  zstd/lib/*.h
  zstd/lib/README.md
  zstd/lib/common/*.c
  zstd/lib/common/*.h
  zstd/lib/compress/*.c
  zstd/lib/compress/*.h
  zstd/lib/decompress/*.c
  zstd/lib/decompress/*.h
  zstd/lib/dictBuilder/*.c
  zstd/lib/dictBuilder/*.h

flag standalone
  description: Use a built-in copy of the zstd library
  default:     True

library
  exposed-modules:
    Codec.Compression.Zstd.Base
    Codec.Compression.Zstd.Efficient
    Codec.Compression.Zstd.FFI
    Codec.Compression.Zstd.Streaming
    Codec.Compression.Zstd.Types
    Codec.Compression.Zstd
    Codec.Compression.Zstd.Lazy

  other-modules:
    Codec.Compression.Zstd.Base.Types
    Codec.Compression.Zstd.FFI.Types
    Codec.Compression.Zstd.Internal

  if flag(standalone)
    c-sources:
      zstd/lib/common/debug.c
      zstd/lib/common/entropy_common.c
      zstd/lib/common/error_private.c
      zstd/lib/common/fse_decompress.c
      zstd/lib/common/pool.c
      zstd/lib/common/threading.c
      zstd/lib/common/xxhash.c
      zstd/lib/common/zstd_common.c
      zstd/lib/compress/fse_compress.c
      zstd/lib/compress/hist.c
      zstd/lib/compress/huf_compress.c
      zstd/lib/compress/zstd_compress.c
      zstd/lib/compress/zstd_double_fast.c
      zstd/lib/compress/zstd_fast.c
      zstd/lib/compress/zstd_lazy.c
      zstd/lib/compress/zstd_ldm.c
      zstd/lib/compress/zstdmt_compress.c
      zstd/lib/compress/zstd_opt.c
      zstd/lib/decompress/huf_decompress.c
      zstd/lib/decompress/zstd_ddict.c
      zstd/lib/decompress/zstd_decompress_block.c
      zstd/lib/decompress/zstd_decompress.c
      zstd/lib/dictBuilder/cover.c
      zstd/lib/dictBuilder/divsufsort.c
      zstd/lib/dictBuilder/fastcover.c
      zstd/lib/dictBuilder/zdict.c

  if flag(standalone)
    include-dirs:
      zstd/lib
      zstd/lib/common
      zstd/lib/compress

  ghc-options: -Wall
  default-language: Haskell2010
  if !flag(standalone)
    extra-libraries: zstd

  build-depends:
    base >= 4.8 && < 5,
    bytestring >= 0.9,
    deepseq,
    ghc-prim

test-suite tests
  type:           exitcode-stdio-1.0
  default-language: Haskell2010
  hs-source-dirs: tests
  main-is:        Main.hs
  ghc-options:    -Wall -threaded -rtsopts
  other-modules:
    Properties
    QuickCheckUtils

  build-depends:
    QuickCheck >= 2.7,
    base >= 4.8 && < 5,
    bytestring >= 0.9,
    test-framework >= 0.4,
    test-framework-quickcheck2 >= 0.2,
    zstd

benchmark benchmarks
  hs-source-dirs:   benchmarks
  main-is:          Benchmarks.hs

  default-language: Haskell2010
  type:             exitcode-stdio-1.0

  build-depends:
    base,
    bytestring,
    criterion,
    ghc-prim,
    zstd,
    zlib

  ghc-options: -Wall -O2

source-repository head
  type:     git
  location: https://github.com/luispedro/hs-zstd