fix atan2,rename {hypot,hypot3} to {norm2,norm3}
[liba.git] / lua / src / crc32.h
blob5cca3aa3c236eeb5d4c27080bfd1792a5916b4a8
1 /***
2 32-bit Cyclic Redundancy Check
3 @classmod a.crc32
4 */
6 #ifndef LUA_LIBA_CRC32_H
7 #define LUA_LIBA_CRC32_H
9 #include "a.h"
11 /***
12 32-bit Cyclic Redundancy Check
13 @field table Cyclic Redundancy Check comparison table
14 @table a.crc32
16 #if defined(__cplusplus)
17 extern "C" {
18 #endif /* __cplusplus */
20 /***
21 constructor for 32-bit Cyclic Redundancy Check
22 @tparam integer poly polynomial that is CRC's divisor
23 @tparam boolean reversed whether or not to reverse
24 @treturn a.crc32 32-bit Cyclic Redundancy Check userdata
25 @function new
27 int liba_crc32_new(lua_State *L);
29 /***
30 generate for 32-bit Cyclic Redundancy Check
31 @tparam integer poly polynomial that is CRC's divisor
32 @tparam boolean reversed whether or not to reverse
33 @treturn a.crc32 32-bit Cyclic Redundancy Check userdata
34 @function gen
36 int liba_crc32_gen(lua_State *L);
38 /***
39 calculate for 32-bit Cyclic Redundancy Check
40 @tparam string block block to be processed
41 @tparam integer value initial value
42 @treturn integer output value
43 @function eval
45 int liba_crc32_eval(lua_State *L);
47 /***
48 pack a block and its 32-bit Cyclic Redundancy Check value
49 @tparam string block block to be processed
50 @tparam integer value initial value
51 @treturn string packed block
52 @function pack
54 int liba_crc32_pack(lua_State *L);
56 #if defined(__cplusplus)
57 } /* extern "C" */
58 #endif /* __cplusplus */
60 #endif /* crc32.h */