Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Accepting already open and limited IO types #535

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

JonasIsensee
Copy link
Collaborator

@JonasIsensee JonasIsensee commented Jan 16, 2024

This adds a method jldopen(::IO, mode; kwargs...)
that should take in already opened IOs and figure out what to do with them.

Currently, this PR implements a ReadOnlyBuffer that can wrap another IO object which only supports reading but not seeking. Therefore it reads linearly and buffers everything in between.

  • figure out what to implement for reading
  • figure out what to implement for writing
  • How to handle a capable external stream (light-weight wrapper)
  • How to figure out what an IO object can do (how to wrap it or error)
  • Do something creative with the filename field in JLDFile

Referencing
#346
#233
#304

Copy link

codecov bot commented Jan 16, 2024

Codecov Report

Attention: Patch coverage is 85.26786% with 33 lines in your changes are missing coverage. Please review.

Project coverage is 86.51%. Comparing base (15eaa50) to head (440b29a).
Report is 28 commits behind head on master.

Files Patch % Lines
src/compression.jl 4.54% 21 Missing ⚠️
src/general_io.jl 94.27% 11 Missing ⚠️
src/JLD2.jl 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #535      +/-   ##
==========================================
- Coverage   86.81%   86.51%   -0.30%     
==========================================
  Files          31       32       +1     
  Lines        4299     4539     +240     
==========================================
+ Hits         3732     3927     +195     
- Misses        567      612      +45     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant