Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4146)

Unified Diff: chrome/third_party/hunspell/src/hunspell/hunzip.hxx

Issue 155841: Update Hunspell to the latest stable version to use the latest dictionary for... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/third_party/hunspell/src/hunspell/hunzip.hxx
===================================================================
--- chrome/third_party/hunspell/src/hunspell/hunzip.hxx (revision 0)
+++ chrome/third_party/hunspell/src/hunspell/hunzip.hxx (revision 0)
@@ -0,0 +1,41 @@
+/* hunzip: file decompression for sorted dictionaries with optional encryption,
+ * algorithm: prefix-suffix encoding and 16-bit Huffman encoding */
+
+#ifndef _HUNZIP_HXX_
+#define _HUNZIP_HXX_
+
+#define BUFSIZE 65536
+#define HZIP_EXTENSION ".hz"
+
+#define MSG_OPEN "error: %s: cannot open\n"
+#define MSG_FORMAT "error: %s: not in hzip format\n"
+#define MSG_MEMORY "error: %s: missing memory\n"
+#define MSG_KEY "error: %s: missing or bad password\n"
+
+struct bit {
+ unsigned char c[2];
+ int v[2];
+};
+
+class Hunzip
+{
+
+protected:
+ char * filename;
+ FILE * fin;
+ int bufsiz, lastbit, inc, inbits, outc;
+ struct bit * dec; // code table
+ char in[BUFSIZE]; // input buffer
+ char out[BUFSIZE + 1]; // Huffman-decoded buffer
+ char line[BUFSIZE + 50]; // decoded line
+ int getcode(const char * key);
+ int getbuf();
+ int fail(const char * err, const char * par);
+
+public:
+ Hunzip(const char * filename, const char * key = NULL);
+ ~Hunzip();
+ const char * getline();
+};
+
+#endif
Property changes on: chrome\third_party\hunspell\src\hunspell\hunzip.hxx
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/third_party/hunspell/src/hunspell/hunspell.cxx ('k') | chrome/third_party/hunspell/src/hunspell/hunzip.cxx » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698