zig icon indicating copy to clipboard operation
zig copied to clipboard

Simplify SeekableStream interface.

Open hawkbee opened this issue 2 years ago • 0 comments

This is an attemp to simplify the SeekableStream interface, this is the kick start part of the try, request for advice.

This pull request managed to use the conventional lseek semantic to simplify the SeekableStream. mostly like the go io.Seeker interface and the rust std:io:Seek trait.

And also add seek function to the BufferedReader and BufferWriter if the underlying stream support seek.

There some decisions to decide to whether to continue to work.

  1. Is this the desired direction to work on.
  2. Whether to eliminate the seek method (seekTo, seekBy, getPos, getEndPos etc) in the file and the like.

Related #14670.

hawkbee avatar Jun 20 '23 12:06 hawkbee