bytes-java icon indicating copy to clipboard operation
bytes-java copied to clipboard

Add multiply and sum methods to Bytes class.

Open mrniko opened this issue 8 years ago • 2 comments

Hi! Thanks for such cool lib!

Is it possible to implement Bytes.multiply and Bytes.sum methods?

mrniko avatar Jan 02 '18 13:01 mrniko

Thanks I'll look into it :)

patrickfav avatar Mar 16 '18 14:03 patrickfav

So the problem with this feature is that it would just replicate the features of BigInteger so the the benefit of packing it to the lib is fairly small I guess. (you could easily convert to/from BigInteger)

I would be open to add it as a BytesTransformer (or so could you in your project), so if you're interested I'll encourage you to create a PR.

This would add a new inner class BytesTransformer and should probably support inPlace altering and should have signed/usinged mode.

patrickfav avatar Mar 16 '18 14:03 patrickfav