/src/gdal/frmts/icechunk/icechunkutils.h
Line | Count | Source |
1 | | /****************************************************************************** |
2 | | * |
3 | | * Project: GDAL |
4 | | * Purpose: Icechunk driver |
5 | | * Author: Even Rouault <even dot rouault at spatialys.com> |
6 | | * |
7 | | ****************************************************************************** |
8 | | * Copyright (c) 2026, Even Rouault <even dot rouault at spatialys.com> |
9 | | * |
10 | | * SPDX-License-Identifier: MIT |
11 | | ****************************************************************************/ |
12 | | |
13 | | #ifndef ICECHUNKUTILS_H |
14 | | #define ICECHUNKUTILS_H |
15 | | |
16 | | #include "cpl_vsi_virtual.h" |
17 | | |
18 | | #include <memory> |
19 | | #include <string> |
20 | | #include <utility> |
21 | | #include <vector> |
22 | | |
23 | | namespace gdal::icechunk |
24 | | { |
25 | | #ifdef DEBUG |
26 | | constexpr bool IS_DEBUG_BUILD = true; |
27 | | #else |
28 | | constexpr bool IS_DEBUG_BUILD = false; |
29 | | #endif |
30 | | |
31 | | void VSIInstallIcechunkFileSystem(); |
32 | | void VSIIcechunkFileSystemClearCaches(); |
33 | | |
34 | | std::string GetFilenameFromDatasetName(const std::string &osDatasetName, |
35 | | std::string &osBranchName, |
36 | | std::string &osTagName, |
37 | | bool &ignoreTimestampEtag); |
38 | | |
39 | | std::pair<std::unique_ptr<unsigned char, VSIFreeReleaser>, size_t> |
40 | | DecompressFile(const char *pszFilename, VSIVirtualHandle *poFile, |
41 | | int nExpectedFileType, int *pnVersion = nullptr); |
42 | | |
43 | | std::string CrockfordBase32Encode(const uint8_t *data, size_t size); |
44 | | |
45 | | template <class T> static std::string CrockfordBase32Encode(const T &buffer) |
46 | 0 | { |
47 | 0 | return CrockfordBase32Encode(buffer.data(), buffer.size()); |
48 | 0 | } Unexecuted instantiation: icechunkrepo.cpp:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > gdal::icechunk::CrockfordBase32Encode<gdal_flatbuffers::Array<unsigned char, (unsigned short)12> >(gdal_flatbuffers::Array<unsigned char, (unsigned short)12> const&) Unexecuted instantiation: icechunksnapshot.cpp:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > gdal::icechunk::CrockfordBase32Encode<gdal_flatbuffers::Array<unsigned char, (unsigned short)12> >(gdal_flatbuffers::Array<unsigned char, (unsigned short)12> const&) Unexecuted instantiation: icechunksnapshot.cpp:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > gdal::icechunk::CrockfordBase32Encode<std::__1::array<unsigned char, 12ul> >(std::__1::array<unsigned char, 12ul> const&) Unexecuted instantiation: vsiicechunk.cpp:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > gdal::icechunk::CrockfordBase32Encode<std::__1::array<unsigned char, 12ul> >(std::__1::array<unsigned char, 12ul> const&) Unexecuted instantiation: icechunkmanifest.cpp:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > gdal::icechunk::CrockfordBase32Encode<gdal_flatbuffers::Array<unsigned char, (unsigned short)8> >(gdal_flatbuffers::Array<unsigned char, (unsigned short)8> const&) Unexecuted instantiation: icechunkmanifest.cpp:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > gdal::icechunk::CrockfordBase32Encode<gdal_flatbuffers::Array<unsigned char, (unsigned short)12> >(gdal_flatbuffers::Array<unsigned char, (unsigned short)12> const&) Unexecuted instantiation: icechunkmanifest.cpp:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > gdal::icechunk::CrockfordBase32Encode<std::__1::array<unsigned char, 8ul> >(std::__1::array<unsigned char, 8ul> const&) |
49 | | } // namespace gdal::icechunk |
50 | | |
51 | | #endif |