From: Sergey Matveev Date: Wed, 13 Nov 2019 14:25:06 +0000 (+0300) Subject: Replace zlib with zstd X-Git-Tag: v5.0.0^2~7 X-Git-Url: http://www.git.cypherpunks.ru/?p=nncp.git;a=commitdiff_plain;h=9c25694667c14c934fc122741b9736988172f7de Replace zlib with zstd --- diff --git a/doc/cmds.texi b/doc/cmds.texi index c2107be..d539523 100644 --- a/doc/cmds.texi +++ b/doc/cmds.texi @@ -387,7 +387,7 @@ Path: stargrave@stargrave.org And with the @option{-dump} option it will give you the actual payload (the whole file, mail message, and so on). @option{-decompress} option -tries to zlib-decompress the data from plain packet (useful for mail +tries to zstd-decompress the data from plain packet (useful for mail packets). @option{-overheads} options print encrypted, plain and size header overheads. diff --git a/doc/download.texi b/doc/download.texi index f675b2d..f25c62e 100644 --- a/doc/download.texi +++ b/doc/download.texi @@ -13,6 +13,7 @@ Tarballs include all necessary required libraries: @item @code{github.com/flynn/noise} @tab BSD 3-Clause @item @code{github.com/gorhill/cronexpr} @tab GNU GPLv3 @item @code{github.com/hjson/hjson-go} @tab MIT +@item @code{github.com/klauspost/compress} @tab BSD 3-Clause @item @code{go.cypherpunks.ru/balloon} @tab GNU LGPLv3 @item @code{golang.org/x/crypto} @tab BSD 3-Clause @item @code{golang.org/x/net} @tab BSD 3-Clause diff --git a/doc/news.ru.texi b/doc/news.ru.texi index c9bd97f..d6047c8 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -7,6 +7,10 @@ @item @strong{Несовместимое} изменение формата конфигурационного файла: YAML заменён на Hjson, из-за его гораздо большей простоты, без заметного потеря функционала и удобства. +@item @strong{Несовместимое} изменение формата простых пакетов. Работа + со старыми версиями не поддерживается. @code{zlib} сжатие заменено + на @code{Zstandard}, так как оно значительно быстрее и эффективнее, + не смотря на то, что версия библиотеки ещё не проверена временем. @item @command{nncp-cfgnew} генерирует конфигурационный файл с множеством комментариев. Можно использовать @option{-nocomments} опцию для старого поведения. diff --git a/doc/news.texi b/doc/news.texi index 211f399..d26d9a9 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -9,6 +9,10 @@ See also this page @ref{Новости, on russian}. @item @strong{Incompatible} configuration file format change: YAML is replaced with Hjson, due to its simplicity, without noticeable lack of either functionality or convenience. +@strong{Incompatible} plain packet format changes. Older versions are + not supported. @code{zlib} compression is replaced with + @code{Zstandard}, due to its speed and efficiency, however library + version is not mature enough. @item @command{nncp-cfgnew} generates configuration file with many comments. @option{-nocomments} option can be used for an old behaviour. diff --git a/doc/pkt.texi b/doc/pkt.texi index d216f93..f7bbe56 100644 --- a/doc/pkt.texi +++ b/doc/pkt.texi @@ -28,7 +28,7 @@ drive. @headitem @tab XDR type @tab Value @item Magic number @tab 8-byte, fixed length opaque data @tab - @verb{|N N C P P 0x00 0x00 0x02|} + @verb{|N N C P P 0x00 0x00 0x03|} @item Payload type @tab unsigned integer @tab 0 (file), 1 (freq), 2 (exec), 3 (transition) @@ -58,7 +58,7 @@ Depending on the packet's type, payload could store: @itemize @item File contents @item Destination path for freq -@item @url{http://zlib.net/, zlib} compressed exec body +@item @url{https://facebook.github.io/zstd/, Zstandard} compressed exec body @item Whole encrypted packet we need to relay on @end itemize diff --git a/doc/sources.texi b/doc/sources.texi index f74985f..2ded27c 100644 --- a/doc/sources.texi +++ b/doc/sources.texi @@ -20,8 +20,10 @@ repositories will be unavailable (they are seldom updated): @item @code{github.com/davecgh/go-xdr} @tab @url{git://git.cypherpunks.ru/go-xdr.git} @item @code{github.com/dustin/go-humanize} @tab @url{git://git.cypherpunks.ru/go-humanize.git} @item @code{github.com/flynn/noise} @tab @url{git://git.cypherpunks.ru/noise.git} +@item @code{github.com/google/go-cmp} @tab @url{git://git.cypherpunks.ru/go-cmp.git} @item @code{github.com/gorhill/cronexpr} @tab @url{git://git.cypherpunks.ru/cronexpr.git} @item @code{github.com/hjson/hjson-go} @tab @url{git://git.cypherpunks.ru/hjson-go.git} +@item @code{github.com/klauspost/compress} @tab @url{git://git.cypherpunks.ru/compress.git} @item @code{golang.org/x/crypto} @tab @url{git://git.cypherpunks.ru/crypto.git} @item @code{golang.org/x/net} @tab @url{git://git.cypherpunks.ru/net.git} @item @code{golang.org/x/sys} @tab @url{git://git.cypherpunks.ru/sys.git} diff --git a/makedist.sh b/makedist.sh index 311c2da..70b7515 100755 --- a/makedist.sh +++ b/makedist.sh @@ -22,6 +22,7 @@ github.com/dustin/go-humanize github.com/flynn/noise github.com/gorhill/cronexpr github.com/hjson/hjson-go +github.com/klauspost/compress go.cypherpunks.ru/balloon golang.org/x/crypto golang.org/x/net @@ -75,6 +76,23 @@ tar cfCI - src $tmp/includes | tar xfC - $tmp rm -fr src/golang.org $tmp/includes mv $tmp/golang.org src +cat > $tmp/includes < $tmp/excludes <