KillingSpark / KillingSpark/zstd-rs

StreamingDecoder: `DEC: BorrowMut<FrameDecoder>` isn't very useful

Open
#74 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
449
Forks
66
PR merge metrics
No merged PRs in 30d

Description

Currently, `DEC` must return a concrete instance of `FrameDecoder` for performing the actual decoding process. I couldn't customize its behavior to include functionality such as tracking the number of decoded bytes.

It would be helpful if `FrameDecoder` implemented a trait that wraps its `.read()` method. This way, `DEC` could be bound to that trait, allowing for more flexible and customizable behavior during decoding.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating DEC, FrameDecoder, and the decoding path that calls FrameDecoder.read(). Review how the concrete decoder is currently bound and determine the trait boundary needed for custom behavior such as byte tracking; done means existing decoding still works while DEC accepts compatible custom decoders.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.