#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/stddef.h>
#include <linux/string.h>
#include <linux/types.h>
#include "debug.h"
#include "ntfs_fs.h"
#define LZNT_ERROR_ALL_ZEROS …
#define LZNT_CHUNK_SIZE …
struct lznt_hash { … };
struct lznt { … };
static inline size_t get_match_len(const u8 *ptr, const u8 *end, const u8 *prev,
size_t max_len)
{ … }
static size_t longest_match_std(const u8 *src, struct lznt *ctx)
{ … }
static size_t longest_match_best(const u8 *src, struct lznt *ctx)
{ … }
static const size_t s_max_len[] = …;
static const size_t s_max_off[] = …;
static inline u16 make_pair(size_t offset, size_t len, size_t index)
{ … }
static inline size_t parse_pair(u16 pair, size_t *offset, size_t index)
{ … }
static inline int compress_chunk(size_t (*match)(const u8 *, struct lznt *),
const u8 *unc, const u8 *unc_end, u8 *cmpr,
u8 *cmpr_end, size_t *cmpr_chunk_size,
struct lznt *ctx)
{ … }
static inline ssize_t decompress_chunk(u8 *unc, u8 *unc_end, const u8 *cmpr,
const u8 *cmpr_end)
{ … }
struct lznt *get_lznt_ctx(int level)
{ … }
size_t compress_lznt(const void *unc, size_t unc_size, void *cmpr,
size_t cmpr_size, struct lznt *ctx)
{ … }
ssize_t decompress_lznt(const void *cmpr, size_t cmpr_size, void *unc,
size_t unc_size)
{ … }