summaryrefslogtreecommitdiffstats
path: root/sbin/hastd/token.l
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-03-06 23:09:33 +0000
committerpjd <pjd@FreeBSD.org>2011-03-06 23:09:33 +0000
commit337b50efa895f3694fae9eeac35a3abd16181e75 (patch)
tree89777d06274aeb1f7f06b2647305a98d160268c9 /sbin/hastd/token.l
parent8697092f0ef00a8c8c15e4c26574e6fbfce848a2 (diff)
downloadFreeBSD-src-337b50efa895f3694fae9eeac35a3abd16181e75.zip
FreeBSD-src-337b50efa895f3694fae9eeac35a3abd16181e75.tar.gz
Allow to compress on-the-wire data using two algorithms:
- HOLE - it simply turns all-zero blocks into few bytes header; it is extremely fast, so it is turned on by default; it is mostly intended to speed up initial synchronization where we expect many zeros; - LZF - very fast algorithm by Marc Alexander Lehmann, which shows very decent compression ratio and has BSD license. MFC after: 2 weeks
Diffstat (limited to 'sbin/hastd/token.l')
-rw-r--r--sbin/hastd/token.l3
1 files changed, 3 insertions, 0 deletions
diff --git a/sbin/hastd/token.l b/sbin/hastd/token.l
index c42c130..1992b77 100644
--- a/sbin/hastd/token.l
+++ b/sbin/hastd/token.l
@@ -50,6 +50,7 @@ listen { DP; return LISTEN; }
port { DP; return PORT; }
replication { DP; return REPLICATION; }
checksum { DP; return CHECKSUM; }
+compression { DP; return COMPRESSION; }
timeout { DP; return TIMEOUT; }
exec { DP; return EXEC; }
resource { DP; return RESOURCE; }
@@ -63,6 +64,8 @@ async { DP; return ASYNC; }
none { DP; return NONE; }
crc32 { DP; return CRC32; }
sha256 { DP; return SHA256; }
+hole { DP; return HOLE; }
+lzf { DP; return LZF; }
[0-9]+ { DP; yylval.num = atoi(yytext); return NUM; }
[a-zA-Z0-9\.\-_/\:]+ { DP; yylval.str = strdup(yytext); return STR; }
\{ { DP; depth++; return OB; }
OpenPOWER on IntegriCloud