http.request gzip file

Any options? I’d like to download a gzip file and save it as an asset…better of course if I could unzip somehow and get what is essentially a text file within. Thanks for any ideas!

The length operator shows that data is there (beyond just the header). How can I view/access that raw data, so I could perhaps work out my own unzipping of gzip files? Thanks again!

@iam3o5am Here’s something I have to show the contents of a http request. Slide your finger on the screen to scroll the display.

displayMode(FULLSCREEN)

function setup()
    font("Courier")
    textMode(CORNER)
    setup1()
    dy=0
    da=0
    hda=0
    str=""
    url="http://www.google.com"
    http.request(url,response)
end

function setup1()
    rows=44
    char=75
    if WIDTH>768 then
        rows=32
        char=100
    end
end
    
function response(data,status,headers)
    str=data
    dataLen=#str
end

function draw()
    background(40, 40, 50)
    fill(255)
    if str~="" then
        pos=1
        startCount=pos+dy
        for z=1,rows do
            str1=""
            for z1=pos+dy,pos+dy+char-1 do
                if z1<=dataLen then
                    v=string.sub(str,z1,z1)
                    if string.byte(v)==10 then
                        v="€"
                    elseif string.byte(v)<32 or string.byte(v)>127 then
                        v="¿"
                    end
                    str1=str1..v
                    endCount=z1
                end
            end                   
            text(str1,0,HEIGHT-50-21*z)
            pos=pos+char
        end
        header=string.format("(Start %6d)     (End %6d)     (Size%6d)",startCount,endCount,dataLen)
        text(header,150,HEIGHT-20)
    else
        text("Reading or No Data",WIDTH/2,HEIGHT/2)
   end
end

function touched(t)
    da=da+t.deltaY/21
    if da<0 then
        da=0
    elseif da>(dataLen/char)-(rows-4) then
        da=hda
    end
    dy=math.floor(da)*char
    hda=da
end