summaryrefslogtreecommitdiff
path: root/ext/web/lib.rs
diff options
context:
space:
mode:
authorLeo Kettmeir <crowlkats@toaxl.com>2022-01-24 18:03:06 +0100
committerGitHub <noreply@github.com>2022-01-24 18:03:06 +0100
commit30ddf436d0d48ce0f9238f1728bc83aa4c6dddad (patch)
tree92cb750fe2a2beaf9b5884530bb3419ddee54cb4 /ext/web/lib.rs
parentae0414fa3581d76af44192567d73dce987c69b9d (diff)
feat(ext/web): add CompressionStream API (#11728)
Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Diffstat (limited to 'ext/web/lib.rs')
-rw-r--r--ext/web/lib.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/web/lib.rs b/ext/web/lib.rs
index 281e55e06..b32deeb97 100644
--- a/ext/web/lib.rs
+++ b/ext/web/lib.rs
@@ -1,6 +1,7 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
mod blob;
+mod compression;
mod message_port;
use deno_core::error::range_error;
@@ -66,6 +67,7 @@ pub fn init(blob_store: BlobStore, maybe_location: Option<Url>) -> Extension {
"11_blob_url.js",
"12_location.js",
"13_message_port.js",
+ "14_compression.js",
))
.ops(vec![
("op_base64_decode", op_sync(op_base64_decode)),
@@ -102,6 +104,18 @@ pub fn init(blob_store: BlobStore, maybe_location: Option<Url>) -> Extension {
"op_message_port_recv_message",
op_async(op_message_port_recv_message),
),
+ (
+ "op_compression_new",
+ op_sync(compression::op_compression_new),
+ ),
+ (
+ "op_compression_write",
+ op_sync(compression::op_compression_write),
+ ),
+ (
+ "op_compression_finish",
+ op_sync(compression::op_compression_finish),
+ ),
])
.state(move |state| {
state.put(blob_store.clone());