compression

Compression and decompression of data using zlib in Nodejs

泄露秘密 提交于 2019-12-30 00:31:16
问题 Can someone please explain to me how the zlib library works in Nodejs? I'm fairly new to Nodejs, and I'm not yet sure how to use buffers and streams. My simple scenario is a string variable, and I want to either zip or unzip (deflate or inflate, gzip or gunzip, etc') the string to another string. I.e. (how I would expect it to work) var zlib = require('zlib'); var str = "this is a test string to be zipped"; var zip = zlib.Deflate(str); // zip = [object Object] var packed = zip.toString(

Enable GZIP Compression error: STATIC_COMPRESSION_NOT_SUCCESS

心已入冬 提交于 2019-12-29 07:55:10
问题 I'm trying to enable GZIP compression on IIS 7.5. I think all the settings are okay. In ApplicationHost.config I have this httpCompression section: <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" minFileSizeForComp="0"> <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" /> <staticTypes> <add mimeType="text/*" enabled="true" /> <add mimeType="message/*" enabled="true" /> <add mimeType="application/x-javascript" enabled="true" /> <add mimeType=

Delphi EXE compressor? [closed]

泄露秘密 提交于 2019-12-29 06:24:57
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . At one point I had a nice little compression utility that smashed my Delphi compiled EXE's to a smaller download size, but now I can't

Tiff compression using Java ImageIO

好久不见. 提交于 2019-12-29 05:30:11
问题 I am having issues converting a png to tiff. The conversion goes fine, but the image is huge. I think the issue is that I am not doing the compression correctly? Anyone have any suggestions?? Here is the code sample public static void test() throws IOException { // String fileName = "4958813_1"; String fileName = "4848970_1"; String inFileType = ".PNG"; String outFileType = ".TIFF"; ImageIO.scanForPlugins(); File fInputFile = new File("I:/HPF/UU/" + fileName + inFileType); InputStream fis =

Tiff compression using Java ImageIO

一个人想着一个人 提交于 2019-12-29 05:30:02
问题 I am having issues converting a png to tiff. The conversion goes fine, but the image is huge. I think the issue is that I am not doing the compression correctly? Anyone have any suggestions?? Here is the code sample public static void test() throws IOException { // String fileName = "4958813_1"; String fileName = "4848970_1"; String inFileType = ".PNG"; String outFileType = ".TIFF"; ImageIO.scanForPlugins(); File fInputFile = new File("I:/HPF/UU/" + fileName + inFileType); InputStream fis =

Create Zip archive from multiple in memory files in C#

末鹿安然 提交于 2019-12-29 03:06:12
问题 Is there a way to create a Zip archive that contains multiple files, when the files are currently in memory? The files I want to save are really just text only and are stored in a string class in my application. But I would like to save multiple files in a single self-contained archive. They can all be in the root of the archive. It would be nice to be able to do this using SharpZipLib. 回答1: Use ZipEntry and PutNextEntry() for this. The following shows how to do it for a file, but for an in

Unzipping zip archives with JavaScript in Firefox 3.6

こ雲淡風輕ζ 提交于 2019-12-28 13:55:10
问题 I am toying with an application that will demo some Firefox 3.6 specific functionality, most of which are listed here: http://demos.hacks.mozilla.org/openweb/ I want to drag a zip file in the browser, unzip it, and work with the unzipped contents. Are there any existing libraries that can do this? Does FireFox 3.6 in particular have something I can use? Or would I have to roll my own unzipper library? For the record: http://github.com/augustl/js-unzip 回答1: There are existing libraries, here

How can I extract or uncompress gzip file using php? [duplicate]

与世无争的帅哥 提交于 2019-12-28 05:48:05
问题 This question already has answers here : How can I unzip a .gz file with PHP? (6 answers) Closed last year . function uncompress($srcName, $dstName) { $sfp = gzopen($srcName, "rb"); $fp = fopen($dstName, "w"); while ($string = gzread($sfp, 4096)) { fwrite($fp, $string, strlen($string)); } gzclose($sfp); fclose($fp); } I tried this code but this does not work, I get: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.

Is it possible to compress video on Android? [closed]

痞子三分冷 提交于 2019-12-28 05:21:09
问题 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 2 years ago . I want to do video compression. Actually in my application I want to have two options, one is low and another is high. If I choose the low option then the application will compress the video and then upload it. If I choose high then it will upload the original video which I have recorded itself. I want to do

Are there any downsides to using UPX to compress a Windows executable?

耗尽温柔 提交于 2019-12-28 03:39:05
问题 I've used UPX before to reduce the size of my Windows executables, but I must admit that I am naive to any negative side effects this could have. What's the downside to all of this packing/unpacking? Are there scenarios in which anyone would recommend NOT UPX-ing an executable (e.g. when writing a DLL, Windows Service, or when targeting Vista or Win7)? I write most of my code in Delphi, but I've used UPX to compress C/C++ executables as well. On a side note, I'm not running UPX in some