I'm currently reading from a sqlite DB. I am having trouble with one column thou ..
The data in that column is compressed. In Java we can use Zlib and we can read that data easily.
data = zlib.decompress(row[3])
I see that Xamarin does not translate zlib in it's IDE and has no standard built in alternative .. Ive seen some Zip components available but are concentrated on files rather than just feeding data directly ..
How would you do this in Xamarin C# ?
EDIT : Code So Far
var myCompressedData = cursor.GetBlob (cursor.GetColumnIndexOrThrow("TextCompressed"));
byte[] myCompressedByte = myCompressedData ;
MemoryStream stream = new MemoryStream(myCompressedByte );
using (DeflateStream decompressionStream = new DeflateStream(stream , CompressionMode.Decompress))
{
decompressionStream.Read(myCompressedByte , 0,myCompressedByte.Length );
}
string UnCompressedString = System.Text.Encoding.UTF8.GetString(myCompressedByte );
Somehow I'm getting a "{System.IO.IOException: Corrupted data ReadInternal at System.IO.Compression.DeflateStreamNative.Chβ¦} System.IO.IOException"
This Exception hits on
decompressionStream.Read(myCompressedByte , 0,myCompressedByte.Length );