proost commented on code in PR #509:
URL: https://github.com/apache/datasketches-cpp/pull/509#discussion_r3576629508
##########
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:
nit; how about `Sink`?
##########
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:
Can you change the test code round-trip way? serialize - deserialize -
compare
--
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]