@@ -110,9 +110,9 @@ namespace SZ {
110
110
//save the huffman Tree in the compressed data
111
111
uint save(uchar *&c) {
112
112
write(offset, c);
113
-
intToBytes_bigEndian(c, nodeCount);
113
+
int32ToBytes_bigEndian(c, nodeCount);
114
114
c += sizeof(int);
115
-
intToBytes_bigEndian(c, huffmanTree->stateNum / 2);
115
+
int32ToBytes_bigEndian(c, huffmanTree->stateNum / 2);
116
116
c += sizeof(int);
117
117
uint totalSize = 0;// = convert_HuffTree_to_bytes_anyStates(nodeCount, c);
118
118
// std::cout << "nodeCount = " << nodeCount << std::endl;
@@ -150,13 +150,13 @@ namespace SZ {
150
150
1; //it's equal to the number of bytes involved (for *outSize)
151
151
byteSizep = bitSize / 8; //it's used to move the pointer p for next data
152
152
if (byteSize <= 8) {
153
-
longToBytes_bigEndian(p, (huffmanTree->code[state])[0]);
153
+
int64ToBytes_bigEndian(p, (huffmanTree->code[state])[0]);
154
154
p += byteSizep;
155
155
} else //byteSize>8
156
156
{
157
-
longToBytes_bigEndian(p, (huffmanTree->code[state])[0]);
157
+
int64ToBytes_bigEndian(p, (huffmanTree->code[state])[0]);
158
158
p += 8;
159
-
longToBytes_bigEndian(p, (huffmanTree->code[state])[1]);
159
+
int64ToBytes_bigEndian(p, (huffmanTree->code[state])[1]);
160
160
p += (byteSizep - 8);
161
161
}
162
162
outSize += byteSize;
@@ -166,7 +166,7 @@ namespace SZ {
166
166
if (lackBits < bitSize) {
167
167
p++;
168
168
long newCode = (huffmanTree->code[state])[0] << lackBits;
169
-
longToBytes_bigEndian(p, newCode);
169
+
int64ToBytes_bigEndian(p, newCode);
170
170
171
171
if (bitSize <= 64) {
172
172
bitSize -= lackBits;
@@ -186,7 +186,7 @@ namespace SZ {
186
186
*p = (*p) | (unsigned char) ((huffmanTree->code[state])[0] >> (64 - lackBits));
187
187
p++;
188
188
newCode = (huffmanTree->code[state])[1] << lackBits;
189
-
longToBytes_bigEndian(p, newCode);
189
+
int64ToBytes_bigEndian(p, newCode);
190
190
bitSize -= lackBits;
191
191
byteSize = bitSize % 8 == 0 ? bitSize / 8 : bitSize / 8 + 1;
192
192
byteSizep = bitSize / 8;
@@ -261,8 +261,8 @@ namespace SZ {
261
261
//load Huffman tree
262
262
void load(const uchar *&c, size_t &remaining_length) {
263
263
read(offset, c, remaining_length);
264
-
nodeCount = bytesToInt_bigEndian(c);
265
-
int stateNum = bytesToInt_bigEndian(c + sizeof(int)) * 2;
264
+
nodeCount = bytesToInt32_bigEndian(c);
265
+
int stateNum = bytesToInt32_bigEndian(c + sizeof(int)) * 2;
266
266
size_t encodeStartIndex;
267
267
if (nodeCount <= 256)
268
268
encodeStartIndex = 1 + 3 * nodeCount * sizeof(unsigned char) + nodeCount * sizeof(T);
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4