snappy / include / hs_snappy.h

#ifndef _hs_snappy_h
#define _hs_snappy_h

#include <stddef.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C"
{
#endif

struct BS {
  const char *ptr;
  size_t off;
  size_t len;
};

size_t _hsnappy_MaxCompressedLength(size_t);

void _hsnappy_RawCompress(const char *input, size_t input_length,
			  char *compressed, size_t *compressed_length);

int _hsnappy_GetUncompressedLength(const char *compressed,
				   size_t compressed_length,
				   size_t *result);

int _hsnappy_RawUncompress(const char *compressed, size_t compressed_length,
			   char *uncompressed);

struct BS;

void _hsnappy_CompressChunks(struct BS *chunks, size_t count,
			     size_t length, char *compressed,
			     size_t *compressed_length);

struct BSSource;

struct BSSource *_hsnappy_NewSource(struct BS *chunks, size_t nchunks,
				    size_t length);

void _hsnappy_DeleteSource(struct BSSource *reader);

int _hsnappy_UncompressChunks(struct BSSource *reader, char *uncompressed);

int _hsnappy_GetUncompressedLengthChunks(struct BSSource *reader,
					 uint32_t *result);

#ifdef __cplusplus
}
#endif

#endif /* _hs_snappy_h */
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.