2017-09-12 03:28:15 +02:00
|
|
|
/*
|
2019-08-03 19:43:48 +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
|
|
|
|
2021-08-12 23:09:01 +02:00
|
|
|
#pragma once
|
2017-11-25 20:45:11 +01:00
|
|
|
#include "taisei.h"
|
2017-02-22 21:52:25 +01:00
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
|
2021-03-23 11:05:47 +01:00
|
|
|
#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);
|