summaryrefslogtreecommitdiff
path: root/src/lowlevel/data.rs
blob: 40afa745e34f981c27def68f77de3f687bd3f806 (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
#[derive(Debug, PartialEq)]
/// The encoding used to encode the tile layer data. When used, it can be “base64” and “csv” at the moment.
pub enum Encoding {
    /// Plain XML based, in <tile> tags
    Xml,
    Base64,
    Csv,
}
#[derive(Debug, PartialEq)]
/// The compression used to compress the tile layer data.
/// Tiled supports “gzip”, “zlib” and (as a compile-time option since Tiled 1.3) “zstd”.
pub enum Compression {
    None,
    Gzip,
    Zlib,
    Zstd,
}

#[derive(Debug, PartialEq)]
pub struct EncodedData {
    pub encoding: Encoding,
    pub compression: Compression,
    pub data: String,
}

impl EncodedData {
    // fn decode(self) -> &[u8] {

    // }
}