m-v-w commented on code in PR #46190:
URL: https://github.com/apache/arrow/pull/46190#discussion_r2103287005


##########
csharp/src/Apache.Arrow/Ipc/ICompressionCodec.cs:
##########
@@ -44,5 +44,21 @@ void Compress(ReadOnlyMemory<byte> source, Stream 
destination)
 #else
         ;
 #endif
+
+        /// <summary>
+        /// try to write compressed data to span
+        /// </summary>
+        /// <param name="source">The data to compress</param>
+        /// <param name="destination">Span to write compressed data to</param>
+        /// <param name="bytesWritten">The number of bytes written to the 
destination</param>
+        /// <returns>true if compressed was successful, false if the 
destination buffer is too small</returns>
+        bool TryCompress(ReadOnlyMemory<byte> source, Memory<byte> 
destination, out int bytesWritten)
+#if NET6_0_OR_GREATER
+        {
+            throw new NotImplementedException("This codec does not support 
compression");

Review Comment:
   Totally agree, using a new interface would have been better. Here some name 
suggestions: 
   `ITryCompressionCodec`, `ICompressionCodecExt`



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to