if i try to read a gzip file with GZipStream on c# like this
string filePath = "....gz";
int count = 0;
using (FileStream reader = File.OpenRead(filePath))
using (var zip = new GZipStream(reader, CompressionMode.Decompress))
using (StreamReader unzip = new StreamReader(zip))
{
while (!unzip.EndOfStream)
{
var data = unzip.ReadLine();
count++;
}
}
Console.WriteLine(count);
i get less row than read decompressed csv file(decompress with Windows shell)
filePath = "...csv";
count = 0;
using (FileStream reader = File.OpenRead(filePath))
using (StreamReader unzip = new StreamReader(reader))
{
while (!unzip.EndOfStream)
{
var data = unzip.ReadLine();
count++;
}
}
Console.WriteLine(count);
The sample are in https://developers.refinitiv.com/en/api-catalog/datascope-select/datascope-select-rest-api/download
Any ideas, the Size and Packed size on gz archive is strange, Packed size are bigger than decompressed Size(on winrar ui)