1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/// @file WASM shim for brotli/decode.h
#pragma once
#include <stddef.h>
#include <stdint.h>
typedef enum {
BROTLI_DECODER_RESULT_ERROR = 0,
BROTLI_DECODER_RESULT_SUCCESS = 1,
BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT = 2,
BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT = 3
} BrotliDecoderResult;
typedef struct BrotliDecoderState BrotliDecoderState;
static inline BrotliDecoderState * BrotliDecoderCreateInstance(void *, void *, void *)
{
return nullptr;
}
static inline void BrotliDecoderDestroyInstance(BrotliDecoderState *) {}
static inline BrotliDecoderResult BrotliDecoderDecompressStream(
BrotliDecoderState *, size_t *, const uint8_t **, size_t *, uint8_t **, size_t *
)
{
return BROTLI_DECODER_RESULT_ERROR;
}
static inline int BrotliDecoderIsFinished(const BrotliDecoderState *)
{
return 0;
}
static inline const char * BrotliDecoderErrorString(int)
{
return "";
}
static inline int BrotliDecoderGetErrorCode(const BrotliDecoderState *)
{
return 0;
}
|