zstd_sys/
bindings_zstd_errors_std.rs

1// Copyright 2024 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Generated by third_party/rust_crates/forks/zstd-sys/bindgen.sh using bindgen 0.71.1
6
7#[repr(u32)]
8#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
9pub enum ZSTD_ErrorCode {
10    ZSTD_error_no_error = 0,
11    ZSTD_error_GENERIC = 1,
12    ZSTD_error_prefix_unknown = 10,
13    ZSTD_error_version_unsupported = 12,
14    ZSTD_error_frameParameter_unsupported = 14,
15    ZSTD_error_frameParameter_windowTooLarge = 16,
16    ZSTD_error_corruption_detected = 20,
17    ZSTD_error_checksum_wrong = 22,
18    ZSTD_error_literals_headerWrong = 24,
19    ZSTD_error_dictionary_corrupted = 30,
20    ZSTD_error_dictionary_wrong = 32,
21    ZSTD_error_dictionaryCreation_failed = 34,
22    ZSTD_error_parameter_unsupported = 40,
23    ZSTD_error_parameter_combination_unsupported = 41,
24    ZSTD_error_parameter_outOfBound = 42,
25    ZSTD_error_tableLog_tooLarge = 44,
26    ZSTD_error_maxSymbolValue_tooLarge = 46,
27    ZSTD_error_maxSymbolValue_tooSmall = 48,
28    ZSTD_error_stabilityCondition_notRespected = 50,
29    ZSTD_error_stage_wrong = 60,
30    ZSTD_error_init_missing = 62,
31    ZSTD_error_memory_allocation = 64,
32    ZSTD_error_workSpace_tooSmall = 66,
33    ZSTD_error_dstSize_tooSmall = 70,
34    ZSTD_error_srcSize_wrong = 72,
35    ZSTD_error_dstBuffer_null = 74,
36    ZSTD_error_noForwardProgress_destFull = 80,
37    ZSTD_error_noForwardProgress_inputEmpty = 82,
38    ZSTD_error_frameIndex_tooLarge = 100,
39    ZSTD_error_seekableIO = 102,
40    ZSTD_error_dstBuffer_wrong = 104,
41    ZSTD_error_srcBuffer_wrong = 105,
42    ZSTD_error_sequenceProducer_failed = 106,
43    ZSTD_error_externalSequences_invalid = 107,
44    ZSTD_error_maxCode = 120,
45}
46unsafe extern "C" {
47    /// ZSTD_getErrorCode() :
48    ///convert a `size_t` function result into a `ZSTD_ErrorCode` enum type,
49    ///which can be used to compare with enum list published above
50    pub fn ZSTD_getErrorCode(functionResult: usize) -> ZSTD_ErrorCode;
51}
52unsafe extern "C" {
53    pub fn ZSTD_getErrorString(code: ZSTD_ErrorCode) -> *const ::core::ffi::c_char;
54}