mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Update to new compress.zlib API
This commit is contained in:

committed by
Mitchell Hashimoto

parent
105817cbe7
commit
4add6889d8
@ -346,11 +346,7 @@ pub const LoadingImage = struct {
|
||||
fn decompressZlib(self: *LoadingImage, alloc: Allocator) !void {
|
||||
// Open our zlib stream
|
||||
var fbs = std.io.fixedBufferStream(self.data.items);
|
||||
var stream = std.compress.zlib.decompressStream(alloc, fbs.reader()) catch |err| {
|
||||
log.warn("zlib decompression failed: {}", .{err});
|
||||
return error.DecompressionFailed;
|
||||
};
|
||||
defer stream.deinit();
|
||||
var stream = std.compress.zlib.decompressor(fbs.reader());
|
||||
|
||||
// Write it to an array list
|
||||
var list = std.ArrayList(u8).init(alloc);
|
||||
|
Reference in New Issue
Block a user