freakyzoidberg commented on code in PR #34:
URL: https://github.com/apache/datasketches-go/pull/34#discussion_r2010467646


##########
cpc/cpc_sketch.go:
##########
@@ -515,15 +541,14 @@ func (c *CpcSketch) bitMatrixOfSketch() ([]uint64, error) 
{
        return matrix, nil
 }
 
+// ToCompactSlice returns this sketch as a compressed byte slice.
 func (c *CpcSketch) ToCompactSlice() ([]byte, error) {
+       // Create the compressed state from the sketch.
        compressedState, err := NewCpcCompressedStateFromSketch(c)
        if err != nil {
                return nil, err
        }
-       capa := compressedState.getRequiredSerializedBytes()
-       buf := make([]byte, capa)
-       // TODO seralize here
-       return buf, nil
+       return compressedState.ExportToMemory()

Review Comment:
   exportToMemory if possible



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