Skip to content

Fix the StreamReader example in the README - #159

Open
sribalakumar wants to merge 1 commit into
SpringMT:mainfrom
sribalakumar:docs-fix-streamreader-example
Open

sribalakumar wants to merge 1 commit into
SpringMT:mainfrom
sribalakumar:docs-fix-streamreader-example

Conversation

@sribalakumar

Copy link
Copy Markdown

Small docs follow-up to #151. That change made StreamReader#read return decompressed bytes and nil at the end of the stream, so the README example no longer matches the code:

  • it read a second 'def', but the StreamWriter example just above only writes "abc";
  • it showed '' at the end of data, where read now returns nil.

This updates the example to the writer's actual output ("abc", then nil), and adds a short eof? example since that method is also part of the reader now. Both snippets were run against current main to confirm the output shown.

Since StreamReader#read was changed to return decompressed bytes (and nil
at end of stream), the README example no longer matches. It read a second
'def' that the writer example never produced, and showed '' at end of
data where read now returns nil. Update the example to the writer's
actual output ("abc", then nil) and add a short eof? example.
@sribalakumar

Copy link
Copy Markdown
Author

@SpringMT Can you look at these docs changes and let me know if any further changes are required.

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.

1 participant