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


##########
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:
   :+1: thanks, the new approach looks much better to me, and also addresses my 
concerns about the LZ4 implementation.



-- 
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