On Windows, always provide an output size when reading or writing (the docs say this is required).