All Questions
Tagged with compression java
24 questions
0
votes
1
answer
99
views
Comparing video recording algorithms in Java: no-compression vs. naive diff compressor
Usage of the program is in Facebook.
Intro
In this JavaFX program, a user is presented with a white canvas with a black circle at the center of the canvas. Then, the user has 10 seconds to record a ...
3
votes
1
answer
628
views
Huffman coding implementation in java
I wrote a simple huffman coding algorithm for learning and practice. I just used the technique given on the wikipedia page.
Could you tell me my missing points and mistakes?
Node.java
...
3
votes
0
answers
239
views
SevenZipCompressor Utility class that uses Commons-Compress to compress and uncompress 7zip archives
I wrote a Compressor utility class to generate 7zip files containing everything in a specific directory. The problem is that it's an order of magnitude slower than both archiving the directory using ...
1
vote
2
answers
950
views
String Compression
Implement a method to perform basic string compression using the counts
of repeated characters.
For example, the string "aabcccccaaa" would become "a2b1c5a3". If the
"...
2
votes
2
answers
355
views
Naive string compression
Description:
Implement a method to perform basic compression using counts of repeated characters. If the compressed string is not smaller then return the original string.
Code:
...
6
votes
2
answers
8k
views
Program to compress a string of characters
I was given this small task in an interview recently. I'm usually terrible at coding questions in interviews, because with the time constraint and the lack of google I usually overthink and rush stuff ...
3
votes
1
answer
806
views
Exporting an object to a ZIP file
I have my own type of object, which implements Serializable. Here I have one called "extendedFormat" (not a terribly helpful name, yes, I know). I'm writing it out ...
-2
votes
1
answer
509
views
Huffman tree node
I've implemented a Huffman tree for one of my academic coursework. For each of the nodes in the tree, there will be a left child, right child, and a parent. For each ...
6
votes
2
answers
7k
views
Perform basic string compression using the counts of repeated characters
I managed to implement this question from Cracking the Coding Interview:
Implement a method to perform basic string compression using the counts
of repeated characters. For example, the string <...
1
vote
1
answer
434
views
Huffman compressor in Java - follow-up
This post improves upon my Java implementation of the Huffman algorithm for data compression.
I did the following improvements:
The map mapping each byte value to its frequency does not rely on ...
2
votes
2
answers
1k
views
Compress an array of strings in Android
I'm compressing an array of strings in an Android app. Is there something you would suggest?
...
7
votes
2
answers
2k
views
Huffman compressor in Java
(See the next iteration as well.)
I have this Java program that can en-/decode files, both text and binary. What comes to critique I want to hear anything regarding these points:
Performance,
...
0
votes
1
answer
1k
views
Compressing a file using zip or gzip
Write a Compress class defines two static methods, gzipFile(), which
compresses a file using GZIP compression format, and zipDirectory(),
which compresses the files (but not directories) in a ...
2
votes
1
answer
13k
views
Simplifying LZW compression & decompression
I have wrote code that takes an input file text that can be compressed, and should contain ascii values, and then a new file is created with an appended ".lzw" and that file can then be decompressed. ...
2
votes
1
answer
108
views
Teamwork challenge for Timus Online Judge
Question is here:
Input
The first line contains an integer \$N\$, which is the quantity of numbers written down by Vasya (\$1 \le N \le 1000\$). The second line contains these numbers separated ...