github.com/cockroachdb/pebble@v0.0.0-20231214172447-ab4952c5f87b/sstable/compression_cgo_test.go (about)

     1  // Copyright 2021 The LevelDB-Go and Pebble Authors. All rights reserved. Use
     2  // of this source code is governed by a BSD-style license that can be found in
     3  // the LICENSE file.
     4  
     5  //go:build cgo
     6  // +build cgo
     7  
     8  package sstable
     9  
    10  // useStandardZstdLib indicates whether the zstd implementation is a port of the
    11  // official one in the facebook/zstd repository.
    12  //
    13  // This constant is only used in tests. Some tests rely on reproducibility of
    14  // SST files, but a custom implementation of zstd will produce different
    15  // compression result. So those tests have to be disabled in such cases.
    16  //
    17  // We cannot always use the official facebook/zstd implementation since it
    18  // relies on CGo.
    19  const useStandardZstdLib = true