diff options
author | Adrian Kummerlaender | 2017-10-05 21:57:08 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2017-10-05 21:57:08 +0200 |
commit | c953c72c86c281d650b2a8ff856e3d614664e11a (patch) | |
tree | b04024fa018cc05a1884c57123115a65884ad704 /example.cc | |
download | DictzipQuery-c953c72c86c281d650b2a8ff856e3d614664e11a.tar DictzipQuery-c953c72c86c281d650b2a8ff856e3d614664e11a.tar.gz DictzipQuery-c953c72c86c281d650b2a8ff856e3d614664e11a.tar.bz2 DictzipQuery-c953c72c86c281d650b2a8ff856e3d614664e11a.tar.lz DictzipQuery-c953c72c86c281d650b2a8ff856e3d614664e11a.tar.xz DictzipQuery-c953c72c86c281d650b2a8ff856e3d614664e11a.tar.zst DictzipQuery-c953c72c86c281d650b2a8ff856e3d614664e11a.zip |
Provide basic read only access to dictzip files
`dictzip::Istream` and `dictzip::IstreamBuf` are forked from `alpinocorpus::DzIstream` and `alpinocorpus::DzIstreamBuf` of rug-compling/alpinocorpus.
Diffstat (limited to 'example.cc')
-rw-r--r-- | example.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/example.cc b/example.cc new file mode 100644 index 0000000..26bf404 --- /dev/null +++ b/example.cc @@ -0,0 +1,17 @@ +#include "istream/stream.h" + +#include <string> +#include <iostream> + +int main() { + dictzip::Istream stream("gcide.dict.dz"); + + // Print the GCIDE definition of _Accession_ + std::string data; + data.reserve(1453); + + stream.seekg(245808); + stream.read(const_cast<char*>(data.data()), 1453); + + std::cout << data.c_str() << std::endl; +} |