mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
chore: further extend the compression analysis (#5065)
Allow export/import of huffman tables via `DEBUG COMPRESSION EXPORT` or `DEBUG COMPRESSION IMPORT <bintable>` Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
4d07d7d053
commit
b3e0bcfb31
4 changed files with 92 additions and 24 deletions
|
@ -1524,13 +1524,13 @@ std::string_view ObjTypeToString(CompactObjType type) {
|
|||
return "Invalid type"sv;
|
||||
}
|
||||
|
||||
std::optional<CompactObjType> ObjTypeFromString(std::string_view sv) {
|
||||
CompactObjType ObjTypeFromString(std::string_view sv) {
|
||||
for (auto& p : kObjTypeToString) {
|
||||
if (absl::EqualsIgnoreCase(sv, p.second)) {
|
||||
return p.first;
|
||||
}
|
||||
}
|
||||
return std::nullopt;
|
||||
return kInvalidCompactObjType;
|
||||
}
|
||||
|
||||
} // namespace dfly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue