jorisvandenbossche commented on code in PR #33698:
URL: https://github.com/apache/arrow/pull/33698#discussion_r1072670375


##########
python/pyarrow/io.pxi:
##########
@@ -1504,15 +1527,21 @@ cdef class CompressedInputStream(NativeFile):
 
     Examples
     --------
+    Create an ouput stream wich compresses the data:
+
     >>> import pyarrow as pa
     >>> data = b"Compressed stream"
     >>> raw = pa.BufferOutputStream()
     >>> with pa.CompressedOutputStream(raw, "gzip") as compressed:
     ...     compressed.write(data)
     ...
     17
+
+    Create an input stream with decompression referencing the
+    buffer with compressed data:
+
     >>> cdata = raw.getvalue()
-    >>> raw = pa.BufferReader(cdata)
+    >>> raw = pa.input_stream(cdata)

Review Comment:
   If we are using `input_stream` here, the question is whether we should 
actually also show directly how to pass the compression to `input_stream(..)`.
   
   Or maybe we can show both? (the easy way with input_stream, and what it 
basically translates to using `BufferReader`+`CompressedInputStream`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to