79145649

Date: 2024-10-31 17:02:36
Score: 2
Natty:
Report link

I owe this answer to @AlwaysLearning. Thanks!

Basically, with the exact same code in the original post, I only had to change Encoding.UTF8 to Encoding.Unicode.

var bytes = Encoding.Unicode.GetBytes(uncompressedString);

Now I can access the data in SSMS and decompress with

  SELECT [Id]
  ,[Name]
  ,[Surname]
  ,Info
  ,CAST(DECOMPRESS(Info) AS NVARCHAR(MAX)) AS  AfterCastingDecompression
  FROM [MCrockett].[dbo].[Player]
  WHERE Id = 9
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • User mentioned (1): @AlwaysLearning
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: McCrockett