|
| 1 | +typedef long unsigned int size_t; |
| 2 | +typedef unsigned char uint8_t; |
| 3 | +typedef enum { |
| 4 | +} BrotliDecoderResult; |
| 5 | + |
| 6 | +BrotliDecoderResult BrotliDecoderDecompress( |
| 7 | + size_t encoded_size, |
| 8 | + const uint8_t encoded_buffer[], |
| 9 | + size_t *decoded_size, |
| 10 | + uint8_t decoded_buffer[]) { return static_cast<BrotliDecoderResult>(0); }; |
| 11 | + |
| 12 | +struct { |
| 13 | +} BrotliDecoderStateStruct; |
| 14 | + |
| 15 | +void strncpy(char *string, const char *string1, int i); |
| 16 | + |
| 17 | +typedef struct BrotliDecoderStateStruct BrotliDecoderState; |
| 18 | + |
| 19 | +BrotliDecoderResult BrotliDecoderDecompressStream( |
| 20 | + BrotliDecoderState *state, size_t *available_in, const uint8_t **next_in, |
| 21 | + size_t *available_out, uint8_t **next_out, size_t *total_out) { return static_cast<BrotliDecoderResult>(0); }; |
| 22 | + |
| 23 | +namespace std { |
| 24 | + void strncpy(char *string, const char *string1, int i) { |
| 25 | + |
| 26 | + } |
| 27 | +} |
| 28 | + |
| 29 | +int main(int argc, const char *argv[]) { |
| 30 | + uint8_t *output = nullptr; |
| 31 | + BrotliDecoderDecompress(1024 * 1024, (uint8_t *) argv[2], |
| 32 | + reinterpret_cast<size_t *>(1024 * 1024 * 1024), output); |
| 33 | + uint8_t **output2 = nullptr; |
| 34 | + const uint8_t **input2 = nullptr; |
| 35 | + std::strncpy(reinterpret_cast<char *>(input2), argv[2], 32); |
| 36 | + BrotliDecoderDecompressStream(0, reinterpret_cast<size_t *>(1024 * 1024), |
| 37 | + input2, reinterpret_cast<size_t *>(1024 * 1024 * 1024), |
| 38 | + output2, |
| 39 | + reinterpret_cast<size_t *>(1024 * 1024 * 1024)); |
| 40 | + return 0; |
| 41 | +} |
0 commit comments