chiark / gitweb /
Provide compressed version of dictionaries
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 5 Jul 2009 20:56:19 +0000 (21:56 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 5 Jul 2009 20:56:19 +0000 (21:56 +0100)
pctb/dictionary-manager

index c504882ccc7273803589a52ad413867304bac69d..d9d3dab0a3d47ed4a3235426429c67a8b9b3f8cc 100755 (executable)
@@ -1068,9 +1068,14 @@ proc remote-serv/take {yesno file dict} {
     manyset [dict2_reqkind_rows $dict] reqkind rows
     
     if {$yesno} {
-       read_database $dictdir/master-$dict.txt
+       set fnbase $dictdir/master-$dict.txt
+       read_database $fnbase
        set database($key) $val
        write_database
+
+       exec gzip -1 < $fnbase > $fnbase.gz.new
+       exec mv -f -- $fnbase.gz.new $fnbase.gz
+
        set desc approve
     } else {
        set desc reject