mz_strm_mem.h 1.7 KB

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