00001 // $Id: f_ut_compress.h 478 2009-10-29 12:26:09Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #include "typedefs.h" 00015 #define COMPR__PATTERN 0x0f0f0f0f 00016 typedef struct 00017 { 00018 INTU4 l_endian; /* set to 1 by creator */ 00019 INTU4 l_length; /* total size [bytes] of compressed buffer */ 00020 INTU4 l_masks; /* number of masks following this header */ 00021 INTU4 l_full_bytes; /* number of bytes needed for uncompressed buffer */ 00022 INTU4 l_comp_bytes; /* number of non zero bytes */ 00023 INTU4 l_pattern; /* COMPR__PATTERN */ 00024 } s_compress; 00025 INTS4 f_ut_compr_size(INTU1 *, INTS4); 00026 INTS4 f_ut_compr_zeros(INTU1 *, INTS4); 00027 INTS4 f_ut_compr_pack(INTU1 *, INTS4, INTU1 *, INTS4); 00028 INTS4 f_ut_compr_unpack(INTU1 *, INTU1 *, INTS4);