{"id":15033071,"url":"https://github.com/ruby/zlib","last_synced_at":"2025-05-15T02:06:27.118Z","repository":{"id":19915727,"uuid":"88257008","full_name":"ruby/zlib","owner":"ruby","description":"Ruby interface for the zlib compression/decompression library","archived":false,"fork":false,"pushed_at":"2025-05-01T01:32:22.000Z","size":831,"stargazers_count":53,"open_issues_count":9,"forks_count":36,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-05-01T02:36:36.638Z","etag":null,"topics":["ruby","zlib"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-04-14T10:05:33.000Z","updated_at":"2025-05-01T01:32:25.000Z","dependencies_parsed_at":"2023-09-25T23:04:52.808Z","dependency_job_id":"b266fce0-db90-4123-a881-22716925a677","html_url":"https://github.com/ruby/zlib","commit_stats":{"total_commits":352,"total_committers":57,"mean_commits":6.175438596491228,"dds":0.84375,"last_synced_commit":"8341fa2e207f72edb4446041c52b0cdc4041b4f0"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fzlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fzlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fzlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fzlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby","download_url":"https://codeload.github.com/ruby/zlib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254259370,"owners_count":22040819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ruby","zlib"],"created_at":"2024-09-24T20:20:01.241Z","updated_at":"2025-05-15T02:06:27.100Z","avatar_url":"https://github.com/ruby.png","language":"C","readme":"# Zlib\n\nThis module provides access to the [zlib library](http://zlib.net). Zlib is designed to be a portable, free, general-purpose, legally unencumbered -- that is, not covered by any patents -- lossless data-compression library for use on virtually any computer hardware and operating system.\n\nThe zlib compression library provides in-memory compression and decompression functions, including integrity checks of the uncompressed data.\n\nThe zlib compressed data format is described in RFC 1950, which is a wrapper around a deflate stream which is described in RFC 1951.\n\nThe library also supports reading and writing files in gzip (.gz) format with an interface similar to that of IO. The gzip format is described in RFC 1952 which is also a wrapper around a deflate stream.\n\nThe zlib format was designed to be compact and fast for use in memory and on communications channels. The gzip format was designed for single-file compression on file systems, has a larger header than zlib to maintain directory information, and uses a different, slower check method than zlib.\n\nSee your system's zlib.h for further information about zlib\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'zlib'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install zlib\n\n## Usage\n\nUsing the wrapper to compress strings with default parameters is quite simple:\n\n```ruby\nrequire \"zlib\"\n\ndata_to_compress = File.read(\"don_quixote.txt\")\n\nputs \"Input size: #{data_to_compress.size}\"\n#=\u003e Input size: 2347740\n\ndata_compressed = Zlib::Deflate.deflate(data_to_compress)\n\nputs \"Compressed size: #{data_compressed.size}\"\n#=\u003e Compressed size: 887238\n\nuncompressed_data = Zlib::Inflate.inflate(data_compressed)\n\nputs \"Uncompressed data is: #{uncompressed_data}\"\n#=\u003e Uncompressed data is: The Project Gutenberg EBook of Don Quixote...\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake compile test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ruby/zlib.\n\n\n## License\n\nThe gem is available as open source under the terms of the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fzlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby%2Fzlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fzlib/lists"}