mz_strm_mem.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* mz_strm_mem.h -- Stream for memory access
  2. part of the minizip-ng project
  3. Copyright (C) 2010-2021 Nathan Moinvaziri
  4. https://github.com/zlib-ng/minizip-ng
  5. This program is distributed under the terms of the same license as zlib.
  6. See the accompanying LICENSE file for the full text of the license.
  7. */
  8. #ifndef MZ_STREAM_MEM_H
  9. #define MZ_STREAM_MEM_H
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. /***************************************************************************/
  14. int32_t mz_stream_mem_open(void *stream, const char *filename, int32_t mode);
  15. int32_t mz_stream_mem_is_open(void *stream);
  16. int32_t mz_stream_mem_read(void *stream, void *buf, int32_t size);
  17. int32_t mz_stream_mem_write(void *stream, const void *buf, int32_t size);
  18. int64_t mz_stream_mem_tell(void *stream);
  19. int32_t mz_stream_mem_seek(void *stream, int64_t offset, int32_t origin);
  20. int32_t mz_stream_mem_close(void *stream);
  21. int32_t mz_stream_mem_error(void *stream);
  22. void mz_stream_mem_set_buffer(void *stream, void *buf, int32_t size);
  23. int32_t mz_stream_mem_get_buffer(void *stream, const void **buf);
  24. int32_t mz_stream_mem_get_buffer_at(void *stream, int64_t position, const void **buf);
  25. int32_t mz_stream_mem_get_buffer_at_current(void *stream, const void **buf);
  26. void mz_stream_mem_get_buffer_length(void *stream, int32_t *length);
  27. void mz_stream_mem_set_buffer_limit(void *stream, int32_t limit);
  28. void mz_stream_mem_set_grow_size(void *stream, int32_t grow_size);
  29. void* mz_stream_mem_create(void **stream);
  30. void mz_stream_mem_delete(void **stream);
  31. void* mz_stream_mem_get_interface(void);
  32. /***************************************************************************/
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. #endif