Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zstd: error 70 : Write error : Broken pipe (cannot write decoded block)

I'm trying through Windows terminal to decompress a large number of compressed files with zstd v1.4.0 and then 'ag' search over :

zstd -dc -r . | ag -z -i "term"

It gives me the following error while proceeding :

zstd: error 70 : Write error : Broken pipe (cannot write decoded block)

I have spent hours looking for a solution, tried different options for the zstd command but can't solve this.

like image 980
titibouboul Avatar asked Jul 31 '19 10:07

titibouboul


1 Answers

If you like to search over uncompressed files, you should use :

zstd -dc -r . | ag -i "term"

zstd will uncompress the supported files and ag will search over it (your command try to uncompress twice, once with zstd, once with ag)

You can get the supported format using zstd -vV that should give you something like :

*** zstd command line interface 64-bits v1.4.0, by Yann Collet ***
*** supports: zstd, zstd legacy v0.5+, gzip

Note: The zstd version I tried doesnot support zip.

You can get the supported compressed format by ag using ag -V, that should give something like :

ag version 2.1.0

Features:
  +jit +lzma +zlib

Note: The ag version I tried doesnot support zip.

like image 104
mpromonet Avatar answered Nov 05 '22 08:11

mpromonet