Skip to content

Conversation

@milanrajani
Copy link

Overview

This Pull Request adds a new helper function DecompressGZIP to decompress GZIP-compressed byte slices into strings, and a corresponding unit test TestDecompressGZIP to validate its correctness.

Changes

  • Added DecompressGZIP function inside [appropriate file, e.g., decompress.go or string_helpers.go].
  • Added decompress_test.go containing TestDecompressGZIP to ensure that the decompression restores the original string correctly.
  • Included a small helper inside test code (compressString) to simulate compressed data.

Motivation

This contribution addresses Issue #455: "Add Decompress helper functions to String type", labeled as good first issue and help wanted. It provides the necessary utility for handling compressed string data in tests or HTTP interactions.

Testing

  • Verified the functionality by running go test ./....
  • Ensured that the decompressed output matches the original uncompressed input.

Notes

  • The helper focuses currently on GZIP compression. Future improvements could extend support for other formats if needed.

Please let me know if any changes or improvements are required!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant