Skip to content

RFC: add assertion utility to test for a gzipped buffer #158

@kgryte

Description

@kgryte

Checklist

Please ensure the following tasks are completed before filing an issue.

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • If this is a general question, searched the FAQ for an existing answer.
  • If this is a feature request, the issue name begins with RFC:.

Description

Description of the issue (or feature request).

This RFC proposes adding an assertion utility to test for a gzipped buffer. This can be achieved by testing the contents of a 10-byte header and possibly checking the footer to ensure the length is mod 2**32.

Prior art:

  • is-gzip: only checks for magic number

Package: @stdlib/assert/is-gzip-buffer
Alias: isgzipBuffer

Related Issues

Does this issue (or feature request) have any related issues?

No.

Questions

Any questions for reviewers?

  • Should another RFC be proposed for testing if a file is a gzipped compressed file? (e.g., is-gzip-file)

Other

Any other information relevant to this issue (or feature request)? This may include screenshots, references, stack traces, sample output, and/or implementation notes.

No.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureIssue or pull request for adding a new feature.RFCRequest for comments. Feature requests and proposed changes.UtilitiesIssue or pull request concerning general utilities.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions