Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Split" and "convert" are undefined #71

Open
annevk opened this issue Feb 26, 2025 · 6 comments
Open

"Split" and "convert" are undefined #71

annevk opened this issue Feb 26, 2025 · 6 comments

Comments

@annevk
Copy link
Member

annevk commented Feb 26, 2025

What is the issue with the Compression Standard?

In

Split |buffer| into one or more non-empty pieces and convert them into {{Uint8Array}}s.

it's somewhat clear what needs to happen, but generally we define "split" and "convert" in more detail.

@nektro
Copy link
Member

nektro commented Feb 26, 2025

@saschanaz
Copy link
Member

I was thinking of modifying the steps to something like:

  1. Pass |chunk| to |context|.
  2. Let |results| be « ».
  3. While |context| has enough data to decompress:
    1. Let |buffer| be the result of the next decompression result.
    2. [=list/Append=] |results| with the result of converting |buffer| to Uint8Array.

It still does not define what "enough data" means, but that can be implementation detail (as it depends on different libraries) and this would match more of what the implementations do.

@annevk
Copy link
Member Author

annevk commented Feb 27, 2025

What does "Pass" mean there?

If something is implementation-defined it would be good to state that explicitly and link the relevant term in Infra.

@saschanaz
Copy link
Member

What does "Pass" mean there?

Giving the chunk to the underlying compression library to compress/decompress. Maybe there's a better way to phrase that.

If something is implementation-defined it would be good to state that explicitly and link the relevant term in Infra.

Agreed, although not immediately clear to me how it could be defined in terms of infra.

@annevk
Copy link
Member Author

annevk commented Feb 27, 2025

There should probably be some concept of a compression system and then you can define "Pass" for that and link it all up.


Infra defines "implementation-defined" which is what you'd link there.

@saschanaz
Copy link
Member

There should probably be some concept of a compression system and then you can define "Pass" for that and link it all up.

Isn't that what "compression context" supposed to be? Maybe we can add more states there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants