Update instructions in containers.rst
[gromacs.git] / src / external / tng_io / include / compression / coder.h
blobd714c82f6f06dd293dbf70c09b34c528c0500f89
1 /* This code is part of the tng compression routines.
3 * Written by Daniel Spangberg
4 * Copyright (c) 2010, 2013, The GROMACS development team.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the Revised BSD License.
9 */
11 #ifndef CODER_H
12 #define CODER_H
14 #ifndef DECLSPECDLLEXPORT
15 #ifdef USE_WINDOWS
16 #define DECLSPECDLLEXPORT __declspec(dllexport)
17 #else /* USE_WINDOWS */
18 #define DECLSPECDLLEXPORT
19 #endif /* USE_WINDOWS */
20 #endif /* DECLSPECDLLEXPORT */
22 struct coder
24 unsigned int pack_temporary;
25 int pack_temporary_bits;
26 int stat_overflow;
27 int stat_numval;
30 struct coder DECLSPECDLLEXPORT *Ptngc_coder_init(void);
31 void DECLSPECDLLEXPORT Ptngc_coder_deinit(struct coder *coder);
32 unsigned char DECLSPECDLLEXPORT *Ptngc_pack_array(struct coder *coder,int *input, int *length, const int coding, const int coding_parameter, const int natoms, const int speed);
33 int DECLSPECDLLEXPORT Ptngc_unpack_array(struct coder *coder,unsigned char *packed,int *output, const int length, const int coding, const int coding_parameter, const int natoms);
34 unsigned char DECLSPECDLLEXPORT *Ptngc_pack_array_xtc2(struct coder *coder,int *input, int *length);
35 int DECLSPECDLLEXPORT Ptngc_unpack_array_xtc2(struct coder *coder, unsigned char *packed, int *output, const int length);
36 unsigned char DECLSPECDLLEXPORT *Ptngc_pack_array_xtc3(int *input, int *length, int natoms, int speed);
37 int DECLSPECDLLEXPORT Ptngc_unpack_array_xtc3(unsigned char *packed,int *output, int length, int natoms);
39 void DECLSPECDLLEXPORT Ptngc_out8bits(struct coder *coder, unsigned char **output);
40 void DECLSPECDLLEXPORT Ptngc_pack_flush(struct coder *coder,unsigned char **output);
41 void DECLSPECDLLEXPORT Ptngc_write_pattern(struct coder *coder,unsigned int pattern, int nbits, unsigned char **output);
43 void DECLSPECDLLEXPORT Ptngc_writebits(struct coder *coder, unsigned int value, const int nbits, unsigned char **output_ptr);
44 void DECLSPECDLLEXPORT Ptngc_write32bits(struct coder *coder,unsigned int value,int nbits, unsigned char **output_ptr);
45 void DECLSPECDLLEXPORT Ptngc_writemanybits(struct coder *coder,unsigned char *value,int nbits, unsigned char **output_ptr);
48 #endif