Most effective way of compressing HTML source , saving at the database and fetching back

447 Views Asked by At

I am writing a crawler atm and i am saving crawled pages source data at the database as a nvarchar(max)

As you can guess this is taking huge space so i believe it would be better apporach for me to compress HTML source at the C# - then save it at the database and when fetching back de-compress it

How can i do this in a most effective way ?

I checked and it seems like there is no way to achieve this at sql server

Ty very much for answers.

c# .net 4.5 wpf

sql server 2014

1

There are 1 best solutions below

0
On BEST ANSWER

If you want to compress or decompress in C#, there are a lot of commercial or free libraries as well.

Or you can use the built-in classes in System.IO.Compression namespace.