cv4g commented on code in PR #509:
URL: https://github.com/apache/datasketches-cpp/pull/509#discussion_r3966375536


##########
count/include/count_min.hpp:
##########
@@ -326,6 +329,15 @@ class count_min_sketch{
    */
   void serialize(std::ostream& os) const;
 
+  /**
+   * This method serializes the sketch by passing binary fragments to a 
callback.
+   * The callback must be callable as write_bytes(const void* data, size_t 
size).
+   * The data pointer is valid only until the callback returns.
+   * @return size in bytes written to the callback
+   */
+  template<typename WriteBytes>

Review Comment:
   Yes, that's much better. 52f8d03751d306a8d44efb3084a650a5a003047d



##########
count/test/count_min_test.cpp:
##########
@@ -300,4 +300,33 @@ TEST_CASE("CountMin sketch: bytes serialize-deserialize 
non-empty", "[cm_sketch]
 
 }
 
+TEST_CASE("CountMin sketch: sink serialize matches bytes", "[cm_sketch]") {

Review Comment:
   Good point! 52f8d03751d306a8d44efb3084a650a5a003047d



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to