mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
@@ -128,9 +128,10 @@ pub const ZlibEncoder = struct {
|
||||
this.stream.flush = @enumFromInt(int);
|
||||
}
|
||||
|
||||
const input_to_queue = JSC.Node.BlobOrStringOrBuffer.fromJSWithEncodingValueMaybeAsync(globalThis, bun.default_allocator, input, optional_encoding, true) orelse {
|
||||
const input_to_queue = JSC.Node.BlobOrStringOrBuffer.fromJSWithEncodingValueMaybeAsync(globalThis, bun.default_allocator, input, optional_encoding, false) orelse {
|
||||
return globalThis.throwInvalidArgumentTypeValue("buffer", "string or an instance of Buffer, TypedArray, DataView, or ArrayBuffer", input);
|
||||
};
|
||||
defer input_to_queue.deinit();
|
||||
|
||||
if (is_last)
|
||||
this.has_called_end = true;
|
||||
@@ -184,9 +185,10 @@ pub const ZlibEncoder = struct {
|
||||
};
|
||||
if (globalThis.hasException()) return .zero;
|
||||
|
||||
const input_to_queue = JSC.Node.BlobOrStringOrBuffer.fromJSWithEncodingValueMaybeAsync(globalThis, bun.default_allocator, input, optional_encoding, true) orelse {
|
||||
const input_to_queue = JSC.Node.BlobOrStringOrBuffer.fromJSWithEncodingValueMaybeAsync(globalThis, bun.default_allocator, input, optional_encoding, false) orelse {
|
||||
return globalThis.throwInvalidArgumentTypeValue("buffer", "string or an instance of Buffer, TypedArray, DataView, or ArrayBuffer", input);
|
||||
};
|
||||
defer input_to_queue.deinit();
|
||||
|
||||
if (is_last)
|
||||
this.has_called_end = true;
|
||||
@@ -611,10 +613,10 @@ pub const ZlibDecoder = struct {
|
||||
};
|
||||
if (globalThis.hasException()) return .zero;
|
||||
|
||||
const input_to_queue = JSC.Node.BlobOrStringOrBuffer.fromJSWithEncodingValueMaybeAsync(globalThis, bun.default_allocator, input, optional_encoding, true) orelse {
|
||||
const input_to_queue = JSC.Node.BlobOrStringOrBuffer.fromJSWithEncodingValue(globalThis, bun.default_allocator, input, optional_encoding) orelse {
|
||||
return globalThis.throwInvalidArgumentTypeValue("buffer", "string or an instance of Buffer, TypedArray, DataView, or ArrayBuffer", input);
|
||||
};
|
||||
|
||||
defer input_to_queue.deinit();
|
||||
if (is_last)
|
||||
this.has_called_end = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user