aboutsummaryrefslogtreecommitdiff
path: root/src/index.cc
diff options
context:
space:
mode:
authorAdrian Kummerlaender2017-10-07 16:57:15 +0200
committerAdrian Kummerlaender2017-10-07 16:57:15 +0200
commitc7a82e67007aecb46315780b53a691a519d90513 (patch)
treeccdeb8ae75a200ec41e34d79eba1ad9671f5a5da /src/index.cc
parent51a422f161e7e7cc5b1093a12e004165754ec1b9 (diff)
downloadDictzipQuery-c7a82e67007aecb46315780b53a691a519d90513.tar
DictzipQuery-c7a82e67007aecb46315780b53a691a519d90513.tar.gz
DictzipQuery-c7a82e67007aecb46315780b53a691a519d90513.tar.bz2
DictzipQuery-c7a82e67007aecb46315780b53a691a519d90513.tar.lz
DictzipQuery-c7a82e67007aecb46315780b53a691a519d90513.tar.xz
DictzipQuery-c7a82e67007aecb46315780b53a691a519d90513.tar.zst
DictzipQuery-c7a82e67007aecb46315780b53a691a519d90513.zip
Introduce ArchiveFile class
Diffstat (limited to 'src/index.cc')
-rw-r--r--src/index.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/index.cc b/src/index.cc
index c8dc6de..b22ae05 100644
--- a/src/index.cc
+++ b/src/index.cc
@@ -5,7 +5,6 @@
#include <algorithm>
-
namespace dictzip {
IndexFile::Entry parse_from_line(const std::string& line) {
@@ -13,8 +12,11 @@ IndexFile::Entry parse_from_line(const std::string& line) {
const std::size_t end = line.find_last_of('\t');
return IndexFile::Entry(
+ // word
line.substr(0, start),
+ // offset
base64_decode(line.substr(start + 1, end - (start + 1))),
+ // length
base64_decode(line.substr(end + 1)));
}