For compatibility, we need to write any data sometimes just to keep producing files that can be read with an older reader.
| 128 | /// For compatibility, we need to write any data sometimes just to keep producing |
| 129 | /// files that can be read with an older reader. |
| 130 | Status WritePaddedBlank(io::OutputStream* stream, int64_t length, |
| 131 | int64_t* bytes_written) { |
| 132 | const uint8_t null = 0; |
| 133 | for (int64_t i = 0; i < length; i++) { |
| 134 | RETURN_NOT_OK(stream->Write(&null, 1)); |
| 135 | } |
| 136 | int64_t remainder = PaddedLength(length) - length; |
| 137 | if (remainder != 0) { |
| 138 | RETURN_NOT_OK(stream->Write(kPaddingBytes, remainder)); |
| 139 | } |
| 140 | *bytes_written = length + remainder; |
| 141 | return Status::OK(); |
| 142 | } |
| 143 | |
| 144 | // ---------------------------------------------------------------------- |
| 145 | // ReaderV1 |
no test coverage detected