ObjFW
Loading...
Searching...
No Matches
OFDeflate64Stream.h
1/*
2 * Copyright (c) 2008-2026 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License version 3.0 only,
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * version 3.0 for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * version 3.0 along with this program. If not, see
17 * <https://www.gnu.org/licenses/>.
18 */
19
20#import "OFStream.h"
21#import "OFKernelEventObserver.h"
22
23OF_ASSUME_NONNULL_BEGIN
24
35{
36 OFStream *_stream;
37 unsigned char *_Nullable _slidingWindow;
38 uint16_t _slidingWindowIndex;
39 struct OFInflateContext *_Nullable _inflateCtx;
40 bool _atEndOfStream;
41 OF_RESERVE_IVARS(OFDeflate64Stream, 4)
42}
43
50@property (retain, nonatomic) OFStream *underlyingStream;
61+ (instancetype)streamWithStream: (OFStream *)stream
62 OF_DEPRECATED(ObjFW, 1, 5, "Use +[streamWithStream:mode:] instead");
63
73+ (instancetype)streamWithStream: (OFStream *)stream mode: (OFString *)mode;
75- (instancetype)init OF_UNAVAILABLE;
76
87- (instancetype)initWithStream: (OFStream *)stream
88 OF_DEPRECATED(ObjFW, 1, 5, "Use -[initWithStream:mode:] instead!");
89
100- (instancetype)initWithStream: (OFStream *)stream
101 mode: (OFString *)mode OF_DESIGNATED_INITIALIZER;
102@end
103
104OF_ASSUME_NONNULL_END
A class that handles Deflate decompression transparently for an underlying stream.
Definition OFDeflate64Stream.h:36
instancetype init()
Initializes an already allocated object.
Definition OFObject.m:671
A base class for different types of streams.
Definition OFStream.h:280
A class for handling strings.
Definition OFString.h:143
This protocol is implemented by classes which can be observed for readiness for reading by OFKernelEv...
Definition OFKernelEventObserver.h:84