diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-10-30 23:33:22 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-10-30 23:33:22 +0400 |
commit | 4b98b0937cfcf8932b8cad2822dc01f9562353fd (patch) | |
tree | 6afb9273399ef2cdbe6a93e17a54036cb5426826 /util/file.hh | |
parent | 06126ae6e259fc619073f09a9d1de9d0b8f109fd (diff) |
Add bzip and xz input for FilePiece KenLM 06f78db2
Diffstat (limited to 'util/file.hh')
-rw-r--r-- | util/file.hh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/file.hh b/util/file.hh index 185cb1f31..c4b95eea9 100644 --- a/util/file.hh +++ b/util/file.hh @@ -76,8 +76,9 @@ uint64_t SizeFile(int fd); void ResizeOrThrow(int fd, uint64_t to); +std::size_t PartialRead(int fd, void *to, std::size_t size); void ReadOrThrow(int fd, void *to, std::size_t size); -std::size_t ReadOrEOF(int fd, void *to_void, std::size_t amount); +std::size_t ReadOrEOF(int fd, void *to_void, std::size_t size); void WriteOrThrow(int fd, const void *data_void, std::size_t size); void WriteOrThrow(FILE *to, const void *data, std::size_t size); @@ -90,6 +91,7 @@ void AdvanceOrThrow(int fd, int64_t off); void SeekEnd(int fd); std::FILE *FDOpenOrThrow(scoped_fd &file); +std::FILE *FDOpenReadOrThrow(scoped_fd &file); std::FILE *FOpenOrThrow(const char *path, const char *mode); |