From c953c72c86c281d650b2a8ff856e3d614664e11a Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 5 Oct 2017 21:57:08 +0200 Subject: 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. --- example.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 example.cc (limited to 'example.cc') 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 +#include + +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(data.data()), 1453); + + std::cout << data.c_str() << std::endl; +} -- cgit v1.2.3