title: Saving a large text as zipped on a varchar field on sql server
body: <p>I'm using VB.net , Entity framework 6 , SQL server 2008R2.</p>
  
  <p>I have a case when on a varchar field I should save a very large text. But the number of characters on this text is not specified so I think that will be very large for that field. ( I know there's a VARCHAR(MAX) but I'm thinking also to have the data size in this field as low as possible ).  Also for several reasons I can't use a file to save this text  ( keeping only the filename on database ).</p>
  
  <p>So I'm asking if is there any way to keep this large text zipped on database and of course to unzip when reading from database.</p>
  
  <p>But I'm searching for a solution that will work with entity framework.
  So if now I'm using :</p>
  
  <pre><code>Myobject.mytext="..... My text...."
  </code></pre>
  
  <p>How can I transform this in order to put the zipped text  ( if is possible )</p>
  
  <p>Thank you !</p>