@@ -225,7 +225,7 @@ void ExportFile(const char* pName, const char* pInputFilename, const char* pOutp
225
225
fprintf (pHeaderFile, " #define %s\n\n " , sDefine .c_str ());
226
226
227
227
fprintf (pSourceFile, " #include \" %s.h\"\n " , sName .c_str ());
228
-
228
+
229
229
if (eOutputMode == E_OUTPUT_MODE_32_LE || eOutputMode == E_OUTPUT_MODE_32_BE)
230
230
{
231
231
fprintf (pSourceFile, " #include <inttypes.h>\n " );
@@ -264,7 +264,7 @@ void ExportFile(const char* pName, const char* pInputFilename, const char* pOutp
264
264
}
265
265
fprintf (pHeaderFile, " %s extern const unsigned long long Size;\n " , sIndentP .c_str ());
266
266
fprintf (pHeaderFile, " %s extern const unsigned long long CompressedSize;\n " , sIndentP .c_str ());
267
- fprintf (pHeaderFile, " %s extern const char* CompressedData;\n " , sIndentP .c_str ());
267
+ fprintf (pHeaderFile, " %s extern const unsigned char* CompressedData;\n " , sIndentP .c_str ());
268
268
269
269
if (eOutputMode != E_OUTPUT_MODE_8)
270
270
{
@@ -274,7 +274,7 @@ void ExportFile(const char* pName, const char* pInputFilename, const char* pOutp
274
274
fprintf (pSourceFile, " %sconst unsigned long long CompressedSize = %zu;\n " , sIndentP .c_str (), iCompressedSize);
275
275
if (eOutputMode == E_OUTPUT_MODE_8)
276
276
{
277
- fprintf (pSourceFile, " %sconst char CompressedDataArray[] = {" , sIndentP .c_str ());
277
+ fprintf (pSourceFile, " %sconst unsigned char CompressedDataArray[] = {" , sIndentP .c_str ());
278
278
}
279
279
else
280
280
{
@@ -288,7 +288,7 @@ void ExportFile(const char* pName, const char* pInputFilename, const char* pOutp
288
288
fprintf (pHeaderFile, " %s extern const bool BigEndian;\n " , sIndentP .c_str ());
289
289
}
290
290
fprintf (pHeaderFile, " %s extern const unsigned long long Size;\n " , sIndentP .c_str ());
291
- fprintf (pHeaderFile, " %s extern const char* Data;\n " , sIndentP .c_str ());
291
+ fprintf (pHeaderFile, " %s extern const unsigned char* Data;\n " , sIndentP .c_str ());
292
292
293
293
if (eOutputMode != E_OUTPUT_MODE_8)
294
294
{
@@ -297,7 +297,7 @@ void ExportFile(const char* pName, const char* pInputFilename, const char* pOutp
297
297
fprintf (pSourceFile, " %sconst unsigned long long Size = %zu;\n " , sIndentP .c_str (), iOriginSize);
298
298
if (eOutputMode == E_OUTPUT_MODE_8)
299
299
{
300
- fprintf (pSourceFile, " %sconst char DataArray[] = {" , sIndentP .c_str ());
300
+ fprintf (pSourceFile, " %sconst unsigned char DataArray[] = {" , sIndentP .c_str ());
301
301
}
302
302
else
303
303
{
@@ -341,11 +341,11 @@ void ExportFile(const char* pName, const char* pInputFilename, const char* pOutp
341
341
342
342
if (eCompressMode != E_COMPRESS_MODE_NONE)
343
343
{
344
- fprintf (pSourceFile, " %sconst char* CompressedData = (const char*)CompressedDataArray;\n " , sIndentP .c_str ());
344
+ fprintf (pSourceFile, " %sconst unsigned char* CompressedData = (const unsigned char*)CompressedDataArray;\n " , sIndentP .c_str ());
345
345
}
346
346
else
347
347
{
348
- fprintf (pSourceFile, " %sconst char* Data = (const char*)DataArray;\n " , sIndentP .c_str ());
348
+ fprintf (pSourceFile, " %sconst unsigned char* Data = (const unsigned char*)DataArray;\n " , sIndentP .c_str ());
349
349
}
350
350
351
351
// Closing namespaces
@@ -516,7 +516,7 @@ void main(int argn, char** argv)
516
516
printf (" - lz4hc : LZ4 High Compression (level 5)\n " );
517
517
printf (" - zstd : Facebook Zstd (level 11)\n " );
518
518
printf (" --m=<mode> : storage output mode\n " );
519
- printf (" - 8 : 8 bits char (default)\n " );
519
+ printf (" - 8 : 8 bits unsigned char (default)\n " );
520
520
printf (" - 32 : 32 bits unsigned int32 auto detect Endianness\n " );
521
521
printf (" - 32le : 32 bits unsigned int32 Little Endian\n " );
522
522
printf (" - 32be : 32 bits unsigned int32 Big Endian\n " );
0 commit comments