jmalkin commented on code in PR #332:
URL: https://github.com/apache/datasketches-cpp/pull/332#discussion_r1089328782
##########
theta/include/theta_sketch.hpp:
##########
@@ -355,6 +357,25 @@ class compact_theta_sketch_alloc: public
theta_sketch_alloc<Allocator> {
*/
vector_bytes serialize(unsigned header_size_bytes = 0) const;
+ /**
+ * This method serializes the sketch into a given stream in a compressed
binary form.
+ * Compression is applied to ordered sketches except empty and single item.
+ * For unordered, empty and single item sketches this method is equivalent
to serialize()
+ * @param os output stream
+ */
+ void serialize_compressed(std::ostream& os) const;
Review Comment:
Yes, I'm saying that if someone explicitly says to serialize as compact we
could order the items to do so. Maybe that means creating a temporary copy,
maybe it means a side effect (but that seems less good). It seems odd to ignore
an explicit request for compression though?
--
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]