1 Star 0 Fork 0

caipengxiang/zlib-ng

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
functable.h 1.60 KB
一键复制 编辑 原始数据 按行查看 历史
traceon 提交于 2021-04-20 15:08 . Fix AppleClang linking
/* functable.h -- Struct containing function pointers to optimized functions
* Copyright (C) 2017 Hans Kristian Rosbach
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#ifndef FUNCTABLE_H_
#define FUNCTABLE_H_
#include "deflate.h"
/*
A hack that helps AppleClang linker to see functable.
A single call to dummy_linker_glue_x() in the compilation unit that reads
functable will resolve "undefined symbol" link error.
*/
void dummy_linker_glue_x();
struct functable_s {
void (* insert_string) (deflate_state *const s, const uint32_t str, uint32_t count);
Pos (* quick_insert_string)(deflate_state *const s, const uint32_t str);
uint32_t (* adler32) (uint32_t adler, const unsigned char *buf, size_t len);
uint32_t (* crc32) (uint32_t crc, const unsigned char *buf, uint64_t len);
void (* slide_hash) (deflate_state *s);
uint32_t (* compare258) (const unsigned char *src0, const unsigned char *src1);
uint32_t (* longest_match) (deflate_state *const s, Pos cur_match);
uint32_t (* chunksize) (void);
uint8_t* (* chunkcopy) (uint8_t *out, uint8_t const *from, unsigned len);
uint8_t* (* chunkcopy_safe) (uint8_t *out, uint8_t const *from, unsigned len, uint8_t *safe);
uint8_t* (* chunkunroll) (uint8_t *out, unsigned *dist, unsigned *len);
uint8_t* (* chunkmemset) (uint8_t *out, unsigned dist, unsigned len);
uint8_t* (* chunkmemset_safe) (uint8_t *out, unsigned dist, unsigned len, unsigned left);
};
extern struct functable_s functable;
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/awfeequdng/zlib-ng.git
git@gitee.com:awfeequdng/zlib-ng.git
awfeequdng
zlib-ng
zlib-ng
clickhouse-new

搜索帮助