You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "adamreeve (via GitHub)" <gi...@apache.org> on 2023/02/09 20:38:56 UTC

[GitHub] [arrow] adamreeve commented on a diff in pull request #33603: GH-32240: [C#] Support decompression of IPC format buffers

adamreeve commented on code in PR #33603:
URL: https://github.com/apache/arrow/pull/33603#discussion_r1101995514


##########
csharp/src/Apache.Arrow/Ipc/ArrowStreamReader.cs:
##########
@@ -31,26 +31,41 @@ public class ArrowStreamReader : IArrowReader, IDisposable
         public Schema Schema => _implementation.Schema;
 
         public ArrowStreamReader(Stream stream)
-            : this(stream, allocator: null, leaveOpen: false)
+            : this(stream, allocator: null, compressionCodecFactory: null, leaveOpen: false)
         {
         }
 
         public ArrowStreamReader(Stream stream, MemoryAllocator allocator)
-            : this(stream, allocator, leaveOpen: false)
+            : this(stream, allocator, compressionCodecFactory: null, leaveOpen: false)
+        {
+        }
+
+        public ArrowStreamReader(Stream stream, ICompressionCodecFactory compressionCodecFactory)
+            : this(stream, allocator: null, compressionCodecFactory, leaveOpen: false)
         {
         }
 
         public ArrowStreamReader(Stream stream, bool leaveOpen)
-            : this(stream, allocator: null, leaveOpen)
+            : this(stream, allocator: null, compressionCodecFactory: null, leaveOpen)
         {
         }
 
         public ArrowStreamReader(Stream stream, MemoryAllocator allocator, bool leaveOpen)
+            : this(stream, allocator, compressionCodecFactory: null, leaveOpen)
+        {
+        }
+
+        public ArrowStreamReader(Stream stream, ICompressionCodecFactory compressionCodecFactory, bool leaveOpen)
+            : this(stream, allocator: null, compressionCodecFactory, leaveOpen)
+        {
+        }
+
+        public ArrowStreamReader(Stream stream, MemoryAllocator allocator, ICompressionCodecFactory compressionCodecFactory, bool leaveOpen)
         {
             if (stream == null)
                 throw new ArgumentNullException(nameof(stream));
 
-            _implementation = new ArrowStreamReaderImplementation(stream, allocator, leaveOpen);
+            _implementation = new ArrowStreamReaderImplementation(stream, allocator, compressionCodecFactory, leaveOpen);
         }
 
         public ArrowStreamReader(ReadOnlyMemory<byte> buffer)

Review Comment:
   That wasn't intentional, I'd missed that there was a separate implementation for reading from a memory buffer. I'll make a PR to fix this.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org