Forum Discussion
Binary.Decompress possible error?
Binary.Length(Web.Contents("https://epss.cyentia.com/epss_scores-current.csv.gz"))
Returns 1391340
Binary.Length(Binary.Decompress(Web.Contents("https://epss.cyentia.com/epss_scores-current.csv.gz"), Compression.GZip))
Returns 63
Why? Please help me.
5 Replies
- jennrattenSuper User
Sometimes the data will be chunked when compressed or encoded so you may be experiencing data loss if it's not handled accordingly. Try querying the headers to get more info like below. The content length should be included in the response.
let searchText = "Power Query" in Web.Headers( "https://www.bing.com", [ RelativePath = "search", Query = [q = searchText] ] )- ElitlogikFrequent Visitor
Hi, thank you for your response.
The Gzipped CSV from cyentia.com is what I want to fetch and analyze in Power BI.
Downloading it manually, Unzip with 7zip and open in Excel works fine.
Using the code in the original post results in a table with only one row.
Isn't it strange that a Compressed file is 1.4 MB compressed and 63 characters Decompressed?
- jennrattenSuper User
That particular compression method is very old and is limited in bits.