1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-30 22:23:13 +03:00

improved --file=FILE implementation

pass basic tests
This commit is contained in:
Yann Collet
2019-10-25 16:36:59 -07:00
parent 14e9010bb5
commit 1ead0c5d5a
5 changed files with 242 additions and 266 deletions

View File

@ -142,12 +142,6 @@ U32 UTIL_isLink(const char* infilename);
U64 UTIL_getFileSize(const char* infilename);
U64 UTIL_getTotalFileSize(const char* const * const fileNamesTable, unsigned nbFiles);
/*! UTIL_readLineFromFile(char* buf, size_t len, File* file):
* @return : int. size next line in file or -1 in case of file ends
* function reads next line in the file
* Will also modify `*file`, advancing it to position where it stopped reading.
*/
int UTIL_readLineFromFile(char* buf, size_t len, FILE* file);
/*Note: tableSize is denotes the total capacity of table*/
typedef struct
@ -171,7 +165,7 @@ FileNamesTable* UTIL_createFileNamesTable_fromFileName(const char* inputFileName
*/
FileNamesTable*
UTIL_createFileNamesTable(const char** filenames, char* buf, size_t tableSize);
UTIL_createFileNamesTable(const char** filenames, size_t tableSize, char* buf);
/*! UTIL_freeFileNamesTable(FileNamesTable* table) :