diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2021-08-20 00:57:00 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2021-08-21 22:38:57 +0300 |
commit | 2b170f16d6ded9b3bcb428121b27274ae8637555 (patch) | |
tree | 3764bd1345eda9843658b8843acd5984f4077b90 /source/blender/blenlib/BLI_fileops.h | |
parent | 34a05f39be2b79dd1c508c374a47cee6792174f9 (diff) |
Refactor low-level blendfile reading into separate files
Instead of handling mmap, compression etc. all directly in readfile.c, refactor
the code to use a generic FileReader.
This makes it easier to add new compression methods or similar, and allows to
reuse the logic in other places (e.g. thumbnail reading).
Reviewed By: campbellbarton, brecht, mont29
Differential Revision: https://developer.blender.org/D5799
Diffstat (limited to 'source/blender/blenlib/BLI_fileops.h')
-rw-r--r-- | source/blender/blenlib/BLI_fileops.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h index 7cfecc798a7..12fa73279c8 100644 --- a/source/blender/blenlib/BLI_fileops.h +++ b/source/blender/blenlib/BLI_fileops.h @@ -166,6 +166,8 @@ size_t BLI_gzip_mem_to_file_at_pos(void *buf, int compression_level) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); size_t BLI_ungzip_file_to_mem_at_pos(void *buf, size_t len, FILE *file, size_t gz_stream_offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); +bool BLI_file_magic_is_gzip(const char header[4]); + size_t BLI_file_descriptor_size(int file) ATTR_WARN_UNUSED_RESULT; size_t BLI_file_size(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); |