@@ -225,7 +225,7 @@ void ExportFile(const char* pName, const char* pInputFilename, const char* pOutp
225225 fprintf (pHeaderFile, " #define %s\n\n " , sDefine .c_str ());
226226
227227 fprintf (pSourceFile, " #include \" %s.h\"\n " , sName .c_str ());
228-
228+
229229 if (eOutputMode == E_OUTPUT_MODE_32_LE || eOutputMode == E_OUTPUT_MODE_32_BE)
230230 {
231231 fprintf (pSourceFile, " #include <inttypes.h>\n " );
@@ -264,7 +264,7 @@ void ExportFile(const char* pName, const char* pInputFilename, const char* pOutp
264264 }
265265 fprintf (pHeaderFile, " %s extern const unsigned long long Size;\n " , sIndentP .c_str ());
266266 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 ());
268268
269269 if (eOutputMode != E_OUTPUT_MODE_8)
270270 {
@@ -274,7 +274,7 @@ void ExportFile(const char* pName, const char* pInputFilename, const char* pOutp
274274 fprintf (pSourceFile, " %sconst unsigned long long CompressedSize = %zu;\n " , sIndentP .c_str (), iCompressedSize);
275275 if (eOutputMode == E_OUTPUT_MODE_8)
276276 {
277- fprintf (pSourceFile, " %sconst char CompressedDataArray[] = {" , sIndentP .c_str ());
277+ fprintf (pSourceFile, " %sconst unsigned char CompressedDataArray[] = {" , sIndentP .c_str ());
278278 }
279279 else
280280 {
@@ -288,7 +288,7 @@ void ExportFile(const char* pName, const char* pInputFilename, const char* pOutp
288288 fprintf (pHeaderFile, " %s extern const bool BigEndian;\n " , sIndentP .c_str ());
289289 }
290290 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 ());
292292
293293 if (eOutputMode != E_OUTPUT_MODE_8)
294294 {
@@ -297,7 +297,7 @@ void ExportFile(const char* pName, const char* pInputFilename, const char* pOutp
297297 fprintf (pSourceFile, " %sconst unsigned long long Size = %zu;\n " , sIndentP .c_str (), iOriginSize);
298298 if (eOutputMode == E_OUTPUT_MODE_8)
299299 {
300- fprintf (pSourceFile, " %sconst char DataArray[] = {" , sIndentP .c_str ());
300+ fprintf (pSourceFile, " %sconst unsigned char DataArray[] = {" , sIndentP .c_str ());
301301 }
302302 else
303303 {
@@ -341,11 +341,11 @@ void ExportFile(const char* pName, const char* pInputFilename, const char* pOutp
341341
342342 if (eCompressMode != E_COMPRESS_MODE_NONE)
343343 {
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 ());
345345 }
346346 else
347347 {
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 ());
349349 }
350350
351351 // Closing namespaces
@@ -516,7 +516,7 @@ void main(int argn, char** argv)
516516 printf (" - lz4hc : LZ4 High Compression (level 5)\n " );
517517 printf (" - zstd : Facebook Zstd (level 11)\n " );
518518 printf (" --m=<mode> : storage output mode\n " );
519- printf (" - 8 : 8 bits char (default)\n " );
519+ printf (" - 8 : 8 bits unsigned char (default)\n " );
520520 printf (" - 32 : 32 bits unsigned int32 auto detect Endianness\n " );
521521 printf (" - 32le : 32 bits unsigned int32 Little Endian\n " );
522522 printf (" - 32be : 32 bits unsigned int32 Big Endian\n " );
0 commit comments