Re: [Jprogramming] Decompressing gzip in J

2019-03-03 Thread Nimp O
Thanks for the support bill, Your procedure worked for me. From: Programming on behalf of bill lam Sent: Saturday, March 2, 2019 11:04 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Decompressing gzip in J use this, load'web/gethttp' api=:'http

Re: [Jprogramming] Decompressing gzip in J

2019-03-03 Thread bill lam
try. (1!:5 Last try: > foo=: 3 : 0 > try. (1!:5 tout=:dquote jpath jout=:'~temp/wget/out' > cmd1=:dquote jpath '~tools/ftp/wget.exe' > cmd2=:dquote jpath '~tools/ftp/busybox.exe' > opts=:' -S -O',tout,' ' > api=:'http://api.stackexchange.com/2.2/answers/264298?order=desc&sort=activity&site=meta&f

Re: [Jprogramming] Decompressing gzip in J

2019-03-03 Thread David Mitchell
Last try: foo=: 3 : 0 try. (1!:5 http://api.stackexchange.com/2.2/answers/264298?order=desc&sort=activity&site=meta&filter=!.UDo6l2ikDi7iGlf' res=:spawn_jtask_ cmd1,opts,api if. +/'Content-Encoding: gzip' E. res do. res=: spawn_jtask_ cmd2,' gunzip -ck ',tout end. ferase Minor cleanup: foo=: 3

Re: [Jprogramming] Decompressing gzip in J

2019-03-03 Thread David Mitchell
Minor cleanup: foo=: 3 : 0 try. (1!:5 http://api.stackexchange.com/2.2/answers/264298?order=desc&sort=activity&site=meta&filter=!.UDo6l2ikDi7iGlf' res=:spawn_jtask_ cmd1,opts,api if. +/'Content-Encoding: gzip' E. res do. res=: spawn_jtask_ cmd2,' gunzip -ck ',tout end. ferase Here is a more ver

Re: [Jprogramming] Decompressing gzip in J

2019-03-03 Thread David Mitchell
Here is a more verbose approach that uses the wget returned response to determine if gunzip is needed: foo=: 3 : 0 tout=:dquote jpath jout=:'~temp/wget/out' tmsg=:dquote jpath '~temp/wget/msg' cmd1=:dquote jpath '~tools/ftp/wget.exe' cmd2=:dquote jpath '~tools/ftp/busybox.exe' opts=:' -S -O',tou