compression

ASP.NET: Compress ViewState

我与影子孤独终老i 提交于 2019-12-03 03:36:54
What are the latest and greatest ways to compress the ASP.NET ViewState content? What about the performance of this? Is it worth it to keep the pages quick and minimize data-traffic? How can I make: <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTM4Mjc3NDEyOWQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgkFLGN0b DAwJENvbnRlbnRQbGFjZUhvbGRlcl9NYWluQ29udGVudCRSYWRCdXQxBSxjdGwwMCRDb250ZW50UGxhY2VIb 2xkZXJfTWFpbkNvbnRlbnQkUmFkQnV0MQUsY3RsMDAkQ29udGVudFBsYWNlSG9sZGVyX01haW5Db250ZW50J FJhZEJ1dDIFLGN0bDAwJENvbnRlbnRQbGFjZUhvbGRlcl9NYWluQ29udGVudCRSYWRCdXQyBSxjdGwwMCRDb

Reducing the file size of a very large images, without changing the image dimensions

雨燕双飞 提交于 2019-12-03 03:34:09
问题 Consider an application handling uploading of potentially very large PNG files. All uploaded files must be stored to disk for later retrieval. However, the PNG files can be up to 30 MB in size, but disk storage limitations gives a maximum per file size of 1 MB. The problem is to take an input PNG of file size up to 30 MB and produce an output PNG of file size below 1 MB. This operation will obviously be lossy - and reduction in image quality, colors, etc is not a problem. However, one thing

Fast search in compressed text files

与世无争的帅哥 提交于 2019-12-03 03:26:37
I need to be able to search for text in a large number of files (.txt) that are zipped. Compression may be changed to something else or even became proprietary. I want to avoid unpacking all files and compress (encode) the search string and search in compressed files. This should be possible using Huffman compression with the same codebook for all files. I don't want to re-invent the wheel, so .. anyone knows a library that does something like this or Huffman algorithm that is implemented and tested, or maybe a better idea ? thanks in advance Most text files are compressed with one of the LZ

Gzip compression not working ASP.net MVC5

风流意气都作罢 提交于 2019-12-03 03:22:08
I want to compress my web application with Gzip and I am using following class compression filter public class CompressFilter : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext filterContext) { HttpRequestBase request = filterContext.HttpContext.Request; string acceptEncoding = request.Headers["Accept-Encoding"]; if (string.IsNullOrEmpty(acceptEncoding)) return; acceptEncoding = acceptEncoding.ToUpperInvariant(); HttpResponseBase response = filterContext.HttpContext.Response; if (acceptEncoding.Contains("GZIP")) { response.AppendHeader("Content-encoding",

What is the best file compression of random binary data that you can achieve? [closed]

那年仲夏 提交于 2019-12-03 03:02:56
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Specifically, what programs are out there and what has the highest compression ratio? I tried Googling it, but it seems experience would trump search results, so I ask. 回答1: If file sizes could be specified accurate to the bit, for any file size N, there would be precisely 2^(N+1)-1 possible files of N bits or

zlib compressing byte array?

谁说胖子不能爱 提交于 2019-12-03 02:44:01
I have this uncompressed byte array: 0E 7C BD 03 6E 65 67 6C 65 63 74 00 00 00 00 00 00 00 00 00 42 52 00 00 01 02 01 00 BB 14 8D 37 0A 00 00 01 00 00 00 00 05 E9 05 E9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 81 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 01 00 00 00 And I need to compress it using the deflate algorithm (implemented in zlib), from what I searched the equivalent in C# would be using GZipStream but I can't match the compressed resulted at all. Here is the compressing code: public byte[] compress(byte[] input) { using (MemoryStream ms

C Library for compressing sequential positive integers

一世执手 提交于 2019-12-03 02:33:42
I have the very common problem of creating an index for an in-disk array of strings. In short, I need to store the position of each string in the in-disk representation. For example, a very naive solution would be an index array as follows: uint64 idx[] = { 0, 20, 500, 1024, ..., 103434 }; Which says that the first string is at position 0, the second at position 20, the third at position 500 and the nth at position 103434. The positions are always non-negative 64 bits integers in sequential order. Although the numbers could vary by any difference, in practice I expect the typical difference to

Is Vary: Accept-Encoding overkill?

感情迁移 提交于 2019-12-03 02:19:52
After reading about how gzip compression works it got me thinking. If the Origin and Proxy server (CDN) both support gzip is adding a Vary: Accept-Encoding header necessary? Kyle Rush The Vary: Accept-Encoding header has more to do with caching than compression. When the Vary: Accept-Encoding header is present, it tells the client that the file can be cached/is the same whether or not the client requests compression. If for some reason the client has an uncompressed version of the file in its cache, it will know not to subsequently request a compressed version of it again and instead to just

How does tinypng.org compress PNG files? [closed]

自作多情 提交于 2019-12-03 01:52:11
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . http://tinypng.org/ is a great service, they optimized my png images by ~67%. How does their service work? How can they minimize size and quality of pictures still remains the same? 回答1: The answer's right on that web page: When you upload a PNG (Portable Network Graphics) file, similar colours in your image are

Video Compression: What is discrete cosine transform?

安稳与你 提交于 2019-12-03 01:51:00
I've implemented an image/video transformation technique called discrete cosine transform. This technique is used in MPEG video encoding. I based my algorithm on the ideas presented at the following URL: http://vsr.informatik.tu-chemnitz.de/~jan/MPEG/HTML/mpeg_tech.html Now I can transform an 8x8 section of a black and white image, such as: 0140 0124 0124 0132 0130 0139 0102 0088 0140 0123 0126 0132 0134 0134 0088 0117 0143 0126 0126 0133 0134 0138 0081 0082 0148 0126 0128 0136 0137 0134 0079 0130 0147 0128 0126 0137 0138 0145 0132 0144 0147 0131 0123 0138 0137 0140 0145 0137 0142 0135 0122