ioindexes

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package ioindexes provides a helper to convert a byte range into a list of block indices for chunked file storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(start, end, partSize uint64) []uint32

Build returns the block indices that span the byte range [start, end] given a partSize. For example, with partSize=1MB, bytes 0–1048575 produce [0]; bytes 1048576–2097151 produce [1]; bytes 500000–2097150 produce [0, 1].

The result is a compact []uint32 suitable for iterating over chunk files on disk. For set operations (union, intersection, difference) prefer the bitmap-based functions in the parent iobuf package.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL