compression

compress pdf size with DPI via java [closed]

心不动则不痛 提交于 2019-12-11 17:30:58
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 months ago . Looking for a way to compress pdf qulity with changing DPI in JAVA. As example I tried PDFBox / itext libraries but still couldn't achieve it. Specially I need set the DPI if the current PDF DPI is higher (I need to reduce the quality on scanned documents) Please note that, I am

Resolution Confusion

ぐ巨炮叔叔 提交于 2019-12-11 17:28:43
问题 Resolution Confusion. I am delivering compressed video, as high a resolution as possible for an iOS app. Are these the final and latest formats? 1920 x 1080- iPad 3+/ 1136 x 640- iPad 2,mini, iPhone 4,5/ 480 x 270- iPhone, non-retina Anything else I need to know? 回答1: The resolution of the devices so far are: (landscape) 2048 x 1536 iPad 3+ 1024 x 768 iPad 2 / 1 / mini 1136 x 640 iPhone 5 960 x 640 iPhone 4S / 4 480 x 320 other iPhones 来源: https://stackoverflow.com/questions/13109467

calculating Lempel-Ziv (LZ) complexity (aka sequence complexity) of a binary string

喜你入骨 提交于 2019-12-11 17:17:52
问题 I need to calculate the LZ-complexity of a binary string. The LZ-complexity is the number of differencet substrings encountered as the stream is viewed from begining to the end. As an example: s = 1001111011000010 Marking in the different substrings the sequence complexity c(s) = 6: s = 1 / 0 / 01 / 1110 / 1100 / 0010 / can someone guide me to find a simple solution for that? I am sure there should be some very straight-forward implementations for this well-known problem, but I have

How to do on the fly image compression in C#?

我是研究僧i 提交于 2019-12-11 17:16:08
问题 I have a web application that allows users to upload images of various formats (PNG, JPEG, GIF). Unfortunately my users are not necessarily technical and end up uploading images that are of way too high quality (and size) than is required. Is there a way for me to compress these images when serving them? By compress I mean lossy compression, reducing the quality and not necessarily the size. Should I be storing the file format as well if different formats are compressed differently? 回答1: Of

Compressing data coming out of WCF

一笑奈何 提交于 2019-12-11 17:00:11
问题 I would like to compress the data coming out of WCF on a basicHttpBinding. I am trying to produce a new version of a system originally written as SOAP web services. In that we returned a GZipStream when we received a request. Is there any way to do the same with WCF? I am using VS2010, currently against .Net 3.5 but that's flexible. Thanks 回答1: If you plan to use IIS hosting and .NET 4.0 client you can use build in dynamic content compression in IIS. If client sends Accept-Encoding: gzip

Java: how to compress a byte[] using ZipOutputStream without intermediate file

两盒软妹~` 提交于 2019-12-11 15:39:57
问题 Requirement: compress a byte[] to get another byte[] using java.util.zip.ZipOutputStream BUT without using any files on disk or in-memory(like here https://stackoverflow.com/a/18406927/9132186). Is this even possible? All the examples I found online read from a file(.txt) and write to a file(.zip). ZipOutputStream needs a ZipEntry to work with and that ZipEntry needs a file. However, my use case is as follows: I need to compress a chunk (say 10MB) of a file at a time using a zip format and

To Compress my jQuery

∥☆過路亽.° 提交于 2019-12-11 14:36:19
问题 How can I compress my jQuery useful? I want to add a function to show an element when I hover another one. The function below is exactly what I want, but I want it more dynamic. Maybe with an data attribute? var item_first = $('.item_first'); var item_second = $('.item_second'); var item_third = $('.item_third'); var item_fourth = $('.item_fourth'); var image_first = $('.image_first'); var image_second = $('.image_second'); var image_third = $('.image_third'); var image_fourth = $('.image

IIS 7.5 no static or dynamic compression

随声附和 提交于 2019-12-11 14:15:47
问题 I can't get static or dynamic compression to work on a new server for .ASP, .JS or .CSS files. I'm running Windows Server 2008 R2 Standard 64 bit. Under IIS Role Services, I have ASP installed, as well as static and dynamic compression. I'm using DefaultAppPool with the standard ApplicationPoolIdentity. I've enabled all the compression options for the site. Here's the relevant section of my applicationHost.config (this is all under system.webServer): <httpCompression directory="%SystemDrive%

Compress image at the time of uploading

别来无恙 提交于 2019-12-11 14:14:50
问题 I want to upload image on server. But before uploading i want to compress that image and then upload to server. I dont want to upload image more than 2 mb. I have used this logic but if image size is to large then it runs no. of loops and also occupied memory increased to 1 gb during processing. double compressionRatio=1; NSData *imgData=UIImagePNGRepresentation(proImage.image,compressionRatio); while ([imgData length]>50000) { compressionRatio=compressionRatio*50; imgData

Concatenate gzipped byte arrays in C#

情到浓时终转凉″ 提交于 2019-12-11 13:56:23
问题 I have gzipped data which is stored in DB. Is there a way to concatenate say 50 separate gzipped data into one gzipped output which can be uncompressed? The result should be same as decompressing that 50 items, concatenating them and then gzipping them. I would like to avoid decompression phase. Is there also some performance benefit of merging already gzipped data instead gzipping whole byte array? 回答1: Yes, you can concatenate gzip streams, which when decompressed give you the same thing as