| 1 | /*=========================================================================== |
| 2 | * |
| 3 | * PUBLIC DOMAIN NOTICE |
| 4 | * National Center for Biotechnology Information |
| 5 | * |
| 6 | * This software/database is a "United States Government Work" under the |
| 7 | * terms of the United States Copyright Act. It was written as part of |
| 8 | * the author's official duties as a United States Government employee and |
| 9 | * thus cannot be copyrighted. This software/database is freely available |
| 10 | * to the public for use. The National Library of Medicine and the U.S. |
| 11 | * Government have not placed any restriction on its use or reproduction. |
| 12 | * |
| 13 | * Although all reasonable efforts have been taken to ensure the accuracy |
| 14 | * and reliability of the software and data, the NLM and the U.S. |
| 15 | * Government do not and cannot warrant the performance or results that |
| 16 | * may be obtained by using this software or data. The NLM and the U.S. |
| 17 | * Government disclaim all warranties, express or implied, including |
| 18 | * warranties of performance, merchantability or fitness for any particular |
| 19 | * purpose. |
| 20 | * |
| 21 | * Please cite the author in any work or product based on this material. |
| 22 | * |
| 23 | * =========================================================================== |
| 24 | * |
| 25 | */ |
| 26 | |
| 27 | #ifndef _SRA_DECOMPRESS_HEADER |
| 28 | #define _SRA_DECOMPRESS_HEADERcxx . . $ `libs/sraxf/v0-decompress.h:28:9`! |
| 29 | |
| 30 | #ifdef __cplusplus |
| 31 | extern "C" { |
| 32 | #endif |
| 33 | |
| 34 | |
| 35 | /* sra compression types |
| 36 | */ |
| 37 | #define SRA_CT_UNCOMPRESSEDcxx . . $ `libs/sraxf/v0-decompress.h:37:9`! 0 |
| 38 | #define SRA_CT_HUFFMANcxx . . $ `libs/sraxf/v0-decompress.h:38:9`! 1 |
| 39 | #define SRA_CT_ZLIBcxx . . $ `libs/sraxf/v0-decompress.h:39:9`! 2 |
| 40 | #define SRA_CT_NCBI2NAcxx . . $ `libs/sraxf/v0-decompress.h:40:9`! 3 |
| 41 | #define SRA_CT_NORMALIZEDcxx . . $ `libs/sraxf/v0-decompress.h:41:9`! 4 |
| 42 | #define SRA_CT_BASELINEDcxx . . $ `libs/sraxf/v0-decompress.h:42:9`! 5 |
| 43 | #define SRA_CT_PACKEDcxx . . $ `libs/sraxf/v0-decompress.h:43:9`! 6 |
| 44 | #define SRA_CT_TRUNCATEDcxx . . $ `libs/sraxf/v0-decompress.h:44:9`! 7 |
| 45 | #define SRA_CT_EXP10cxx . . $ `libs/sraxf/v0-decompress.h:45:9`! 8 |
| 46 | #define SRA_CT_TRANSLATEcxx . . $ `libs/sraxf/v0-decompress.h:46:9`! 9 |
| 47 | |
| 48 | |
| 49 | /* forward of KDataBuffer */ |
| 50 | struct KDataBuffercxx . . $ KDataBuffer#; |
| 51 | |
| 52 | |
| 53 | /* blob header pseudo descriptions |
| 54 | * NB - all structs are single-byte aligned |
| 55 | * |
| 56 | struct HDR_454_POSITION |
| 57 | { |
| 58 | uint8_t type; |
| 59 | uint16_t osize; -- double compressed, 2 headers total |
| 60 | }; |
| 61 | |
| 62 | struct HDR_454_READ |
| 63 | { |
| 64 | uint8_t type; |
| 65 | uint16_t osize; -- 1 byte per base, i.e. row-length |
| 66 | }; |
| 67 | |
| 68 | struct HDR_454_QUALITY |
| 69 | { |
| 70 | uint8_t type; |
| 71 | uint16_t osize; -- double compressed |
| 72 | }; |
| 73 | |
| 74 | struct HDR_454_CLIP |
| 75 | { |
| 76 | uint8_t type; |
| 77 | uint32_t osize; -- zlib compressed |
| 78 | }; |
| 79 | |
| 80 | struct HDR_454_SIGNAL |
| 81 | { |
| 82 | uint8_t type; |
| 83 | uint16_t osize; -- double compressed |
| 84 | }; |
| 85 | |
| 86 | struct HDR_SLX_ZLIB |
| 87 | { |
| 88 | uint8_t type; |
| 89 | uint32_t osize; -- double compressed |
| 90 | }; |
| 91 | |
| 92 | struct HDR_SLX_QUALITY |
| 93 | { |
| 94 | uint8_t type; |
| 95 | uint32_t osize; |
| 96 | uint8_t qmin; |
| 97 | uint8_t qmax; |
| 98 | uint16_t fixed_len; |
| 99 | }; |
| 100 | |
| 101 | struct HDR_SLX_READ |
| 102 | { |
| 103 | uint8_t type; |
| 104 | uint32_t osize; |
| 105 | uint16_t fixed_len; |
| 106 | }; |
| 107 | |
| 108 | struct HDR_SLX_SIG_HUFFMAN |
| 109 | { |
| 110 | uint8_t type; |
| 111 | uint32_t osize; |
| 112 | uint16_t fixed_len; |
| 113 | float sim; |
| 114 | float snm; |
| 115 | }; |
| 116 | |
| 117 | struct HDR_SLX_SIG_BASELINE -- or uncompressed |
| 118 | { |
| 119 | uint8_t type; |
| 120 | uint32_t osize; |
| 121 | uint16_t fixed_len; |
| 122 | uint32_t baseline; |
| 123 | }; |
| 124 | |
| 125 | struct HDR_SLX_SIG_NORMALIZED |
| 126 | { |
| 127 | uint8_t type; |
| 128 | uint32_t osize; |
| 129 | uint16_t fixed_len; |
| 130 | uint16_t min; |
| 131 | float scale; |
| 132 | }; |
| 133 | |
| 134 | */ |
| 135 | |
| 136 | /* decompression routines: |
| 137 | * return a pointer to an allocated memory buffer and the size of the buffer in bytes |
| 138 | * you would need to free(*dst) after its use |
| 139 | * |
| 140 | * parameters: |
| 141 | * platform = 1 (454), 2 (solexa) |
| 142 | * dst - a pointer to a buffer into which an uncompressed data is written |
| 143 | * dsize - the size of the incompressed data |
| 144 | * src - compressed data source |
| 145 | * ssize - size of compressed data |
| 146 | * |
| 147 | * return values: 0 - OK, 1 - error |
| 148 | */ |
| 149 | void sra_decompress_initcxx . . $ sra_decompress_init(49f6e7a06ebc5aa8). (void); |
| 150 | |
| 151 | /* SIGNAL */ |
| 152 | int sra_decompress_sig_454cxx . . $ sra_decompress_sig_454(7d0d1b8ee7ff5b4d).(struct KDataBuffercxx . . $ KDataBuffer# *dst, struct KDataBuffercxx . . $ KDataBuffer# *alt, const void* src, int ssize); |
| 153 | int sra_decompress_sig_slxcxx . . $ sra_decompress_sig_slx(7d0d1b8ee7ff5b4d).(struct KDataBuffercxx . . $ KDataBuffer# *dst, struct KDataBuffercxx . . $ KDataBuffer# *alt, const void* src, int ssize); |
| 154 | /* INTENSITY */ |
| 155 | int sra_decompress_intcxx . . $ sra_decompress_int(7d0d1b8ee7ff5b4d).(struct KDataBuffercxx . . $ KDataBuffer# *dst, struct KDataBuffercxx . . $ KDataBuffer# *alt, const void* src, int ssize); |
| 156 | /* NOISE */ |
| 157 | int sra_decompress_nsecxx . . $ sra_decompress_nse(7d0d1b8ee7ff5b4d).(struct KDataBuffercxx . . $ KDataBuffer# *dst, struct KDataBuffercxx . . $ KDataBuffer# *alt, const void* src, int ssize); |
| 158 | /* QUALITY */ |
| 159 | int sra_decompress_prb_454cxx . . $ sra_decompress_prb_454(7d0d1b8ee7ff5b4d).(struct KDataBuffercxx . . $ KDataBuffer# *dst, struct KDataBuffercxx . . $ KDataBuffer# *alt, const void* src, int ssize); |
| 160 | int sra_decompress_prb_slxcxx . . $ sra_decompress_prb_slx(7d0d1b8ee7ff5b4d).(struct KDataBuffercxx . . $ KDataBuffer# *dst, struct KDataBuffercxx . . $ KDataBuffer# *alt, const void* src, int ssize); |
| 161 | /* POSITION */ |
| 162 | int sra_decompress_poscxx . . $ sra_decompress_pos(7d0d1b8ee7ff5b4d).(struct KDataBuffercxx . . $ KDataBuffer# *dst, struct KDataBuffercxx . . $ KDataBuffer# *alt, const void* src, int ssize); |
| 163 | /* CLIP_QUALITY_ */ |
| 164 | int sra_decompress_clpcxx . . $ sra_decompress_clp(7d0d1b8ee7ff5b4d).(struct KDataBuffercxx . . $ KDataBuffer# *dst, struct KDataBuffercxx . . $ KDataBuffer# *alt, const void* src, int ssize); |
| 165 | |
| 166 | #ifdef __cplusplus |
| 167 | } |
| 168 | #endif |
| 169 | |
| 170 | #endif |