I kept the signedness and bit width of almost all variables very closely aligned to the original, even if it didn't seem to make sense (like signed types which logically cannot be <0, or potential bugs around bit widths). I think there is room for improvement and even bug fixes in the original Java code here, but for now, I did not want to risk introducing new bugs by deviating too much in the Go version.
This is closely modeled after the Java version: https://github.com/ChronixDB/chronix.timeseries/blob/master/chronix-timeseries-converter/src/main/proto/MetricPoint.proto
I kept the signedness and bit width of almost all variables very closely aligned to the original, even if it didn't seem to make sense (like signed types which logically cannot be <0, or potential bugs around bit widths). I think there is room for improvement and even bug fixes in the original Java code here, but for now, I did not want to risk introducing new bugs by deviating too much in the Go version.