sg icon indicating copy to clipboard operation
sg copied to clipboard

New standard: Compression Streams

Open saschanaz opened this issue 1 year ago • 4 comments

Following https://github.com/WICG/compression/issues/32, I propose standardizing Compression Streams API in WHATWG. It's an API that allows compressing and decompressing BufferSource types using a set of the most common compression algorithms (gzip/deflate/deflate-raw) in browsers through Stream API.

@ricea is the editor and I'm helping him for the transition.

compression sounds like a good short name, matching the current short name in WICG.

One open question that is blocking me from writing a full workstream proposal is that whether this matches in the existing Streams workstream. The current scope looks explicitly limited to low level stream API:

https://github.com/whatwg/sg/blob/ab9abf930e84ed83770ce4daa3a0aacd56c897de/db.json#L436

But @ricea is also an editor in Streams spec, so it may still make sense to have a common workstream?

saschanaz avatar Apr 09 '24 13:04 saschanaz

Hey @saschanaz, thanks for raising this!

This is something we need the entire @whatwg/sg to chime in on. From my perspective it can reasonably be considered in scope of the Streams Workstream and thus not require a new one. Our next meeting is April 23, but I'll see if I can get everyone to comment here before then.

annevk avatar Apr 10 '24 05:04 annevk

Apologies for the delay, the meeting got canceled as people are/have been traveling. The next meeting is scheduled for May 7. Hopefully people find some time to comment before then though as I don't really think there's anything controversial here.

annevk avatar Apr 26 '24 12:04 annevk

At Microsoft we are supportive of having this work in WHATWG, if the current editors and the other SG members are ok with this.

diekus avatar Apr 26 '24 14:04 diekus

OK with me.

cwilso avatar Apr 27 '24 18:04 cwilso

@github.com/annevk’s proposal in https://github.com/whatwg/sg/issues/231#issuecomment-2046559430 to add Compression Streams to the Streams Workstream is OK with me.

(Originally published at: https://tantek.com/2024/128/t1/)

tantek avatar May 07 '24 17:05 tantek

@saschanaz @ricea the SG reached agreement as you can tell.

https://github.com/whatwg/meta/blob/main/NEW-STANDARD.md has a checklist you can follow to add a new WHATWG standard. @domenic, @foolip, and I can help out as needed (@domenic or @foolip will have to help with step 1.i and 3; I'm happy to help with the remainder).

annevk avatar May 07 '24 17:05 annevk

Yay! Let me know when the old repo needs to be archived and/or have redirects put in place.

yoavweiss avatar May 24 '24 07:05 yoavweiss

I think it would be ideal to move the repository wholesale into the WHATWG, via @domenic / @foolip / I as intermediary (I believe it cannot be transferred directly). Should probably wait until @saschanaz and @ricea have had a chance to go through the checklist.

annevk avatar May 24 '24 07:05 annevk

Yeah, that would work as well, but I believe we'd need someone with owner access to both orgs. Maybe @cwilso has that?

yoavweiss avatar May 24 '24 07:05 yoavweiss

Transferring directly would be ideal for redirects. (I'm not sure if GitHub would simplify a A→B→C redirect to A→C.)

foolip avatar May 24 '24 07:05 foolip

@yoavweiss the people I listed have the necessary access on the WHATWG side. As in, you transfer it to one of domenic/foolip/annevk and they transfer it again. That should work and is how we did this before.

annevk avatar May 24 '24 08:05 annevk

Alright, for https://github.com/whatwg/meta/blob/main/NEW-STANDARD.md, the shortname would be compression as it already is in WICG.

2 would be fun 😅 any idea what should it look like? I can only imagine WinZip-like icon, and adobe stock has something like this.

image

saschanaz avatar May 24 '24 12:05 saschanaz

https://www.svgrepo.com/svg/238546/compress is under CC0 and seems reasonable enough. Up to you though. @saschanaz are you willing to PR db.json as well?

annevk avatar May 24 '24 13:05 annevk

Before having an actual repo transferred? If that's okay then yes.

saschanaz avatar May 24 '24 14:05 saschanaz

Yeah that's fine. We won't merge until we have everything in order, but the more that's ready the easier it'll be to do the final administrative bits.

annevk avatar May 24 '24 15:05 annevk

I now have transferred the repo using temporary WICG powers granted by @yoavweiss. I didn't give any teams access and haven't done anything else.

foolip avatar May 27 '24 12:05 foolip

  • I merged the logo.
  • I updated some of the repository settings.
  • I ran spec-factory and put up https://github.com/whatwg/compression/pull/57 as a result.
  • Left a couple questions in https://github.com/whatwg/sg/pull/236 and suggested RD publication months (new months as all existing publication months already have 5 documents).

What needs to happen still:

  • The spec-factory PR needs review.
  • @foolip or @domenic need to setup the domain.
  • Someone needs to update index.bs to account for the WHATWG template and update the IPR section to acknowledge where this effort started, similar to https://urlpattern.spec.whatwg.org/#ipr.
  • Need to go through https://github.com/whatwg/meta/blob/main/NEW-STANDARD.md again to make sure all boxes are ticked. There's some more repository settings to fix at least.

annevk avatar May 27 '24 13:05 annevk