martin-g commented on a change in pull request #1358:
URL: https://github.com/apache/avro/pull/1358#discussion_r795460794



##########
File path: lang/csharp/src/apache/main/File/Codec.cs
##########
@@ -43,9 +44,10 @@ public abstract class Codec
         /// <summary>
         /// Decompress data using implemented codec
         /// </summary>
-        /// <param name="compressedData"></param>
+        /// <param name="compressedData">The buffer holding data to 
decompress.</param>
+        /// <param name="length">The actual length of bytes to decompress from 
the buffer.</param>
         /// <returns></returns>
-        abstract public byte[] Decompress(byte[] compressedData);
+        abstract public byte[] Decompress(byte[] compressedData, int length);

Review comment:
       > The change I've pushed is simply to overload the method so that you 
have both method signatures, the one without a length argument and the one with 
it.
   
   I still think my suggestion to mark the old method as deprecated/Obsolete 
and to implement it as in 
https://github.com/apache/avro/pull/1358/files#r795248968 better.
   Currently 
https://github.com/apache/avro/pull/1358/files#diff-f6b2b3f158e175d309773571f11f7cf979b6ba983e3c00f28b0d7e869910f6b3R310
 calls the new method. So, at some point we should be able to remove the old 
one.
   I don't know whether C# supports `default method in interface` as in 
Java/Scala. It would be the best if the old method is left as Obsolete only in 
Codec.cs




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