diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-09-04 15:48:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-09-04 15:54:24 +0400 |
commit | 15d39eaac12c0837f51abdb2041b306b8e9e0d26 (patch) | |
tree | 7d7259e59613d795799b7120eff0f55c53e2ea27 /source/blender/blenlib | |
parent | fbed2047c8e84a535c32bf3f3fb3ea1791a08571 (diff) |
Write Compressed blend files directly
Writing compressed files would write the uncompressed blend, then re-compress on-disk.
Use a wrapper for open/write/close commands
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_fileops.h | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/fileops.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h index b574447558c..4f451a6c741 100644 --- a/source/blender/blenlib/BLI_fileops.h +++ b/source/blender/blenlib/BLI_fileops.h @@ -101,7 +101,9 @@ int BLI_access(const char *filename, int mode); bool BLI_file_is_writable(const char *file); bool BLI_file_touch(const char *file); +#if 0 /* UNUSED */ int BLI_file_gzip(const char *from, const char *to); +#endif char *BLI_file_ungzip_to_mem(const char *from_file, int *r_size); size_t BLI_file_descriptor_size(int file); diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 0893c3e380f..f6bbd3273f9 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -66,7 +66,7 @@ #include "BLI_fileops.h" #include "BLI_sys_types.h" // for intptr_t support - +#if 0 /* UNUSED */ /* gzip the file in from and write it to "to". * return -1 if zlib fails, -2 if the originating file does not exist * note: will remove the "from" file @@ -111,6 +111,7 @@ int BLI_file_gzip(const char *from, const char *to) return rval; } +#endif /* gzip the file in from_file and write it to memory to_mem, at most size bytes. * return the unziped size |