Added script to easily compress pcaps.

This commit is contained in:
Pedro Pinto committed 2020-08-20 10:43:58 -04:00
1 parent b871cc4e09
commit c43ec4a56d
1 file changed
+17
@@ -0,0 +1,17 @@
#!/bin/bash
DIR="$(dirname "$(readlink -f "$0")")"
SRC_ROOT=$DIR/../../../../../../../../
BUILD_ROOT=`readlink -f $SRC_ROOT/build/ninja_release/server`
IN=$1
PIPE=$(mktemp -u /tmp/spartan-compress-pipe.XXXXXX.pcap)
mkfifo $PIPE
xz -zc -T0 $PIPE > $IN.xz & (cd $BUILD_ROOT && ./sparkd spartan compress $IN $PIPE)
wait