JuliaIO / JuliaIO/TranscodingStreams.jl

API for Buffer

Open
#202 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
90
Forks
25
PR merge metrics
No merged PRs in 30d

Description

I was taking with @nhz2 about how Automa (and presumably other packages) use internals from TranscodingStreams, and how it would be nice to make it stop doing that. However, TS was created by the same author as Automa, and the two packages' internals are entangled. So, for Automa to not rely on TS internals, TS needs to offer these things as API. In particular:

  • Access to the .data field of a TranscodingStream, either as a Vector{UInt8} or potentially Memory{UInt8} going forward
  • Get and set the .markpos and .bufferpos fields of the read Buffer of a stream
  • Get the .marginpos of the read Buffer of a stream

Ideally, the Buffer object can also be obtained so the user can manipulate the Buffer directly.

Another approach is for Automa to stop using TranscodingStreams, and instead use something like BufferedStreams.jl. However, I believe TranscodingStreams might have originally been implemented to support Automa.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the TranscodingStream and read Buffer internals named in the issue, especially data, markpos, bufferpos, and marginpos, and compare how Automa accesses them. The work is done when TranscodingStreams exposes the required state through a documented API, including the intended Buffer access, without requiring Automa to use internals.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.