Maybe it could be something like:
```
if (bytes.size() > BigArrays.PAGE_SIZE_IN_BYTES) {
    bytes = bigarrays.resize(bytes, BigArrays.PAGE_SIZE_IN_BYTES);
}
```