------------------------------------------------------------------------------
| 1393 | |
| 1394 | //------------------------------------------------------------------------------ |
| 1395 | int vtkXMLWriter::WriteCompressionHeader() |
| 1396 | { |
| 1397 | // Write real compression header back into stream. |
| 1398 | std::streampos returnPosition = this->Stream->tellp(); |
| 1399 | |
| 1400 | // Need to byte-swap header. |
| 1401 | this->PerformByteSwap(this->CompressionHeader->Data(), this->CompressionHeader->WordCount(), |
| 1402 | this->CompressionHeader->WordSize()); |
| 1403 | |
| 1404 | if (!this->Stream->seekp(std::streampos(this->CompressionHeaderPosition))) |
| 1405 | { |
| 1406 | return 0; |
| 1407 | } |
| 1408 | int result = (this->DataStream->StartWriting() && |
| 1409 | this->DataStream->Write(this->CompressionHeader->Data(), this->CompressionHeader->DataSize()) && |
| 1410 | this->DataStream->EndWriting()); |
| 1411 | this->Stream->flush(); |
| 1412 | if (this->Stream->fail()) |
| 1413 | { |
| 1414 | this->SetErrorCode(vtkErrorCode::GetLastSystemError()); |
| 1415 | return 0; |
| 1416 | } |
| 1417 | |
| 1418 | if (!this->Stream->seekp(returnPosition)) |
| 1419 | { |
| 1420 | return 0; |
| 1421 | } |
| 1422 | return result; |
| 1423 | } |
| 1424 | |
| 1425 | //------------------------------------------------------------------------------ |
| 1426 | size_t vtkXMLWriter::GetOutputWordTypeSize(int dataType) |
no test coverage detected