{"id":16660948,"url":"https://github.com/agrafix/superbuffer","last_synced_at":"2025-03-21T17:31:45.276Z","repository":{"id":39861759,"uuid":"75283943","full_name":"agrafix/superbuffer","owner":"agrafix","description":"Haskell: Efficiently build a bytestring from smaller chunks","archived":false,"fork":false,"pushed_at":"2022-06-25T06:07:07.000Z","size":371,"stargazers_count":24,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-26T01:31:01.065Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agrafix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-01T10:57:38.000Z","updated_at":"2022-06-25T05:51:01.000Z","dependencies_parsed_at":"2022-08-20T23:10:49.215Z","dependency_job_id":null,"html_url":"https://github.com/agrafix/superbuffer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Fsuperbuffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Fsuperbuffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Fsuperbuffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Fsuperbuffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agrafix","download_url":"https://codeload.github.com/agrafix/superbuffer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221817141,"owners_count":16885469,"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":[],"created_at":"2024-10-12T10:32:33.194Z","updated_at":"2024-10-28T10:31:28.819Z","avatar_url":"https://github.com/agrafix.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haskell SuperBuffer\n\n[![CircleCI](https://circleci.com/gh/agrafix/superbuffer.svg?style=svg)](https://circleci.com/gh/agrafix/superbuffer)\n[![Hackage](https://img.shields.io/hackage/v/superbuffer.svg)](http://hackage.haskell.org/package/superbuffer)\n\nThe `superbuffer` packages was designed to efficiently build up bytestrings from `IO` actions producing\nsmaller chunks. The goal was to reduce memory overhead as much as possible while still being as fast as possible.\nIn our use case, it reduced total memory usage of the program from `350 MB` (`bytestring` builder) to `50 MB` (`superbuffer`).\nFor speed see benchmarks below. Note that the speed heavily depends on a good choice of the initial buffer size. `superbuffer` outperforms or performs similar to the `bytestring` alternatives consistently. `superbuffer` outperforms `buffer-builder`.\n\n## Usage\n\n```haskell\n{-# LANGUAGE OverloadedStrings #-}\nmodule Example where\n\nimport Data.ByteString.SuperBuffer\nimport qualified Data.ByteString as BS\n\nmyBS :: IO BS.ByteString\nmyBS =\n    -- note: performance of superbuffer heavily depends on a\n    -- smart choice of the initial buffer size. Benchmark to\n    -- find what suits your needs.\n    withBuffer 1024 $ \\buf -\u003e\n    do appendBuffer buf \"Hello \"\n       appendBuffer buf \"World!\"\n```\n\n## Benchmarks\n\nSee: [Benchmarks for 0.3.0.0](https://agrafix.github.io/superbuffer/benchmarks-0.3.0.0.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrafix%2Fsuperbuffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagrafix%2Fsuperbuffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrafix%2Fsuperbuffer/lists"}