| 17 | } |
| 18 | |
| 19 | uint64_t Sd4Block::Write(std::streambuf& buffer) { |
| 20 | const auto update = FilePosition() > 0; |
| 21 | if (update) { |
| 22 | return block_length_; |
| 23 | } |
| 24 | block_type_ = "##SD"; |
| 25 | link_list_.clear(); |
| 26 | block_length_ = 24 + data_.size(); |
| 27 | |
| 28 | auto bytes = MdfBlock::Write(buffer); |
| 29 | bytes += WriteByte(buffer, data_); |
| 30 | return bytes; |
| 31 | } |
| 32 | |
| 33 | uint64_t Sd4Block::AppendData(const VlsdData& data) { |
| 34 | // First check if the data block already exist |