Socket
Book a DemoInstallSign in
Socket

github.com/ipfs/go-qringbuf

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/ipfs/go-qringbuf

Source
Go Modules
Version
v0.0.0-20250821073249-7477cd996bb2
Version published
Created
Source

q(uantized)ringbuf(fer)

A thread-safe variant of a classic circular buffer with a double-twist

qringbuf is a circular buffer variant, similar to (but not a derivative of) Bip Buffer and spsc-bip-buffer/bbqueue. It provides a concurrency-friendly, zero-copy abstraction of io.ReadAtLeast() over a pre-allocated ring-buffer, populated asynchronously by a standalone goroutine. Refer to the implementation-notes diagrams to get a quick overview of how this works in practice.

This library is primarily designed for processing a series of arbitrary streams, each comprised of variable-length records. Refer to the Examples and to the StartFill(…) / NextRegion(…) combo for a crash-course in usage patterns.

Documentation

https://pkg.go.dev/github.com/ipfs/go-qringbuf

Lead Maintainer

Peter Rabbitson

License

SPDX-License-Identifier: Apache-2.0 OR MIT

FAQs

Package last updated on 21 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts