Library unpacking MySQL BLOBS in c#

158 views Asked by At

I have some BLOBS column in a MySQL database. I want to unpack, read it and the save unpacked data into another table.

Is there a library for unpacking MySQL BLOBS in c#? I have tried using code but was wondering if there was any free library for the same.

1

There are 1 answers

0
Pushpendra On BEST ANSWER

Hi you can use MessagePack library for unpacking the blob data into json format.

 byte[] test = (Byte[])reader[0];
    Console.WriteLine("============================RAW===========================================");                            
    string text = System.Text.UnicodeEncoding.UTF8.GetString(test);
    Console.WriteLine(text);
    Console.WriteLine("============================UNPACKED======================================");
    var json = MessagePackSerializer.ToJson(test);