Fengzdadi commented on PR #91: URL: https://github.com/apache/datasketches-go/pull/91#issuecomment-3708383138
> This is review before i look up serialization for ReservoirItemsSketch. > > if "T" is some struct, how to serialization/deserialization? If "T" is int, should we reserve 32bit or 64bit in memory? Thanks for the question! I reviewed both Java and C++ implementations. My approach: | Type | Handling | |------|----------| | `int32` | 4 bytes (native size) | | `int64` | 8 bytes (native size) | | `string` | length prefix + content | | `struct` | User-provided SerDe interface | This follows the Java/C++ pattern. I'll provide built-in serializers for common types (int64, string, etc.), and users can implement the interface for custom structs. Do you think this proposal is feasible? -- 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]
