aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/codecs/static/static.h
blob: c1eaed2a742e38822f9b239817d5e4099267f537 (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
31
32
33
34
#pragma once

#include <library/cpp/codecs/codecs.h>

#include <util/generic/strbuf.h>
#include <util/generic/string.h>
#include <util/stream/output.h>

namespace NCodecs {
    class TStaticCodecInfo;

    // load

    TCodecConstPtr RestoreCodecFromCodecInfo(const TStaticCodecInfo&);

    TStaticCodecInfo LoadCodecInfoFromString(TStringBuf data);

    TString LoadStringFromArchive(const ui8* begin, size_t size);

    TCodecConstPtr RestoreCodecFromArchive(const ui8* begin, size_t size);

    // save

    TString SaveCodecInfoToString(const TStaticCodecInfo&);

    void SaveCodecInfoToStream(IOutputStream& out, const TStaticCodecInfo&);

    // misc

    TStaticCodecInfo LoadCodecInfoFromStream(IInputStream& in);

    TString FormatCodecInfo(const TStaticCodecInfo&);

}