load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")

oncall("secure_pipes")

cpp_library(
    name = "certificate_compressor",
    headers = [
        "CertificateCompressor.h",
    ],
    exported_deps = [
        "//fizz/record:record",
    ],
)

cpp_library(
    name = "cert_decompression_manager",
    srcs = [
        "CertDecompressionManager.cpp",
    ],
    headers = [
        "CertDecompressionManager.h",
    ],
    exported_deps = [
        "//fizz/compression:certificate_compressor",
    ],
)

cpp_library(
    name = "brotli_certificate_compressor",
    srcs = [
        "BrotliCertificateCompressor.cpp",
    ],
    headers = [
        "BrotliCertificateCompressor.h",
    ],
    deps = ["fbsource//third-party/brotli:brotli_encode"],
    exported_deps = [
        "//fizz/compression:certificate_compressor",
    ],
)

cpp_library(
    name = "brotli_certificate_decompressor",
    srcs = [
        "BrotliCertificateDecompressor.cpp",
    ],
    headers = [
        "BrotliCertificateDecompressor.h",
    ],
    deps = ["fbsource//third-party/brotli:brotli_decode"],
    exported_deps = [
        "//fizz/compression:certificate_compressor",
    ],
)

cpp_library(
    name = "zlib_certificate_compressor",
    srcs = [
        "ZlibCertificateCompressor.cpp",
    ],
    headers = [
        "ZlibCertificateCompressor.h",
    ],
    exported_deps = [
        "//fizz/compression:certificate_compressor",
    ],
    exported_external_deps = [
        ("zlib", None, "z"),
    ],
)

cpp_library(
    name = "zlib_certificate_decompressor",
    srcs = [
        "ZlibCertificateDecompressor.cpp",
    ],
    headers = [
        "ZlibCertificateDecompressor.h",
    ],
    exported_deps = [
        "//fizz/compression:certificate_compressor",
    ],
    exported_external_deps = [
        ("zlib", None, "z"),
    ],
)

cpp_library(
    name = "zstd_certificate_compressor",
    srcs = [
        "ZstdCertificateCompressor.cpp",
    ],
    headers = [
        "ZstdCertificateCompressor.h",
    ],
    deps = [
        "fbsource//third-party/zstd:zstd",
    ],
    exported_deps = [
        "//fizz/compression:certificate_compressor",
    ],
)

cpp_library(
    name = "zstd_certificate_decompressor",
    srcs = [
        "ZstdCertificateDecompressor.cpp",
    ],
    headers = [
        "ZstdCertificateDecompressor.h",
    ],
    deps = [
        "fbsource//third-party/zstd:zstd",
    ],
    exported_deps = [
        "//fizz/compression:certificate_compressor",
    ],
)
