aboutsummaryrefslogtreecommitdiff
path: root/example.cc
diff options
context:
space:
mode:
Diffstat (limited to 'example.cc')
-rw-r--r--example.cc17
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;
+}