Skip to content

chore: start refactoring to only use bytes by refactoring the ByteBuffer internals#47

Merged
CommanderStorm merged 15 commits intofast-pack:mainfrom
CommanderStorm:buffer-refactor
Feb 13, 2026
Merged

chore: start refactoring to only use bytes by refactoring the ByteBuffer internals#47
CommanderStorm merged 15 commits intofast-pack:mainfrom
CommanderStorm:buffer-refactor

Conversation

@CommanderStorm
Copy link
Collaborator

@CommanderStorm CommanderStorm commented Feb 13, 2026

this is the first of many PR, otherwise I cannot make this reviewable.

I am a abit tiread, will go over my changes tomorrow again

Works towards #35

@CommanderStorm CommanderStorm requested review from Copilot and nyurik and removed request for Copilot February 13, 2026 02:31
@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 80.76923% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/rust/integer_compression/variable_byte.rs 62.50% 9 Missing ⚠️
src/rust/integer_compression/fastpfor.rs 96.42% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the ByteBuffer implementation to use the bytes crate instead of a custom buffer implementation, simplifying the codebase by removing the custom IntBuffer abstraction and associated methods like flip() and as_int_buffer().

Changes:

  • Replaced custom ByteBuffer implementation with BytesMut from the bytes crate
  • Removed IntBuffer struct and its associated conversion logic
  • Updated variable_byte.rs and fastpfor.rs to use direct iteration with get_u32_le() and put_u32_le() instead of buffer conversion methods

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/rust/bytebuffer.rs Replaced custom buffer implementation with BytesMut, removed IntBuffer and buffer manipulation methods
src/rust/integer_compression/variable_byte.rs Refactored to use iterator-based approach with get_u32_le() instead of as_int_buffer()
src/rust/integer_compression/fastpfor.rs Updated to use direct loops with get_u32_le() and put_u32_le() instead of buffer conversion
Cargo.toml Added bytes dependency to the rust feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@CommanderStorm CommanderStorm changed the title chore: start refactoring to only use buffer by refactoring the ByteBuffer internals chore: start refactoring to only use bytes by refactoring the ByteBuffer internals Feb 13, 2026
@CommanderStorm CommanderStorm enabled auto-merge (squash) February 13, 2026 14:31
CommanderStorm and others added 5 commits February 13, 2026 15:46
one of the problems with this crate is that it is currently fairly dense
and sparsely documented.

Disclaimer: I let an LLM do the first pass, but verified every
documented claim

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… geometric data for compression/decompression/round-trip/rate (fast-pack#51)

I asked my LLM (claude) of choice to write a benchmark for this since we
don't currently have one and since this is fairly manual work.

This is mostly done to check a few assumptions around
fast-pack#49

I reviewed every line and fixed the issues that were caused.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@CommanderStorm CommanderStorm merged commit b1794df into fast-pack:main Feb 13, 2026
8 of 9 checks passed
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.

3 participants