taisei/src/rwops/rwops_zlib.h

26 lines
1 KiB
C
Raw Normal View History

2017-09-12 03:28:15 +02:00
/*
* This software is licensed under the terms of the MIT License.
2017-09-12 03:28:15 +02:00
* See COPYING for further information.
* ---
2024-05-16 23:30:41 +02:00
* Copyright (c) 2011-2024, Lukas Weber <laochailan@web.de>.
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
2017-09-12 03:28:15 +02:00
*/
2017-02-22 21:52:25 +01:00
#pragma once
#include "taisei.h"
2017-02-22 21:52:25 +01:00
#include <SDL.h>
#define RW_DEFLATE_LEVEL_DEFAULT -1
SDL_RWops *SDL_RWWrapZlibReader(SDL_RWops *src, size_t bufsize, bool autoclose);
SDL_RWops *SDL_RWWrapZlibWriter(SDL_RWops *src, int clevel, size_t bufsize, bool autoclose);
// For raw deflate streams
SDL_RWops *SDL_RWWrapInflateReader(SDL_RWops *src, size_t bufsize, bool autoclose);
SDL_RWops *SDL_RWWrapDeflateWriter(SDL_RWops *src, int clevel, size_t bufsize, bool autoclose);
// NOTE: uses inefficient emulation to implement seeking. Source must be seekable as well.
SDL_RWops *SDL_RWWrapZlibReaderSeekable(SDL_RWops *src, int64_t uncompressed_size, size_t bufsize, bool autoclose);
SDL_RWops *SDL_RWWrapInflateReaderSeekable(SDL_RWops *src, int64_t uncompressed_size, size_t bufsize, bool autoclose);