aboutsummaryrefslogtreecommitdiffstats
path: root/util/stream/aligned.cpp
blob: 2fd12d15b7402530f6529d09fb96e936789807d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "aligned.h"

size_t TAlignedInput::DoRead(void* ptr, size_t len) {
    size_t ret = Stream_->Read(ptr, len);
    Position_ += ret;
    return ret;
}

size_t TAlignedInput::DoSkip(size_t len) {
    size_t ret = Stream_->Skip(len);
    Position_ += ret;
    return ret;
}

size_t TAlignedInput::DoReadTo(TString& st, char ch) {
    size_t ret = Stream_->ReadTo(st, ch);
    Position_ += ret;
    return ret;
}

ui64 TAlignedInput::DoReadAll(IOutputStream& out) {
    ui64 ret = Stream_->ReadAll(out);
    Position_ += ret;
    return ret;
}

void TAlignedOutput::DoWrite(const void* ptr, size_t len) {
    Stream_->Write(ptr, len);
    Position_ += len;
}