|
|
|
|
|
by cakoose
1555 days ago
|
|
This code has a bug that can cause the count to be overreported. The last `file.Read` may only partially fill the buffer, but this code will look for 1s in the entire buffer. (This bug won't affect the performance comparison, but I was just reminded of how error prone these kinds APIs can be vs the PHP/Python route of having the library function just allocate a new buffer each time.) |
|