I have a byte[4096] and was wondering what the fastest way is to check if all values are zero?
byte[4096]
Is there any way faster than doing:
byte[] b
This may not be the fastest or most memory performant solution but it's a one liner:
byte[] arr = randomByteArray(); assert Arrays.equals(arr, new byte[arr.length]);