@@ -8,7 +8,7 @@ pub const compressed_block = types.compressed_block;
8
8
const RingBuffer = @import ("zstandard/RingBuffer.zig" );
9
9
pub const decompress = @import ("zstandard/decompress.zig" );
10
10
11
- pub fn ZstandardStream (
11
+ pub fn Stream (
12
12
comptime ReaderType : type ,
13
13
comptime verify_checksum : bool ,
14
14
comptime window_size_max : usize ,
@@ -232,19 +232,19 @@ pub fn ZstandardStream(
232
232
};
233
233
}
234
234
235
- pub fn zstandardStream (
235
+ pub fn stream (
236
236
allocator : Allocator ,
237
237
reader : anytype ,
238
238
comptime window_size_max : usize ,
239
- ) ZstandardStream (@TypeOf (reader ), true , window_size_max ) {
240
- return ZstandardStream (@TypeOf (reader ), true , 8 * (1 << 20 )).init (allocator , reader );
239
+ ) Stream (@TypeOf (reader ), true , window_size_max ) {
240
+ return Stream (@TypeOf (reader ), true , 8 * (1 << 20 )).init (allocator , reader );
241
241
}
242
242
243
243
fn testDecompress (data : []const u8 ) ! []u8 {
244
244
var in_stream = std .io .fixedBufferStream (data );
245
- var stream = zstandardStream (std .testing .allocator , in_stream .reader (), 1 << 23 );
246
- defer stream .deinit ();
247
- const result = stream .reader ().readAllAlloc (std .testing .allocator , std .math .maxInt (usize ));
245
+ var zstd_stream = stream (std .testing .allocator , in_stream .reader (), 1 << 23 );
246
+ defer zstd_stream .deinit ();
247
+ const result = zstd_stream .reader ().readAllAlloc (std .testing .allocator , std .math .maxInt (usize ));
248
248
return result ;
249
249
}
250
250
0 commit comments