Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ...
coderodde's user avatar
  • 31.3k
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 ...
gedofgont's user avatar
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 ...
Nzall's user avatar
  • 1,538
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 "...
Exploring's user avatar
  • 345
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: ...
CodeYogi's user avatar
  • 5,205
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 ...
Eoin's user avatar
  • 263
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 ...
MMAdams's user avatar
  • 133
-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 ...
Sean Francis N. Ballais's user avatar
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 <...
TheLearner's user avatar
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 ...
coderodde's user avatar
  • 31.3k
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? ...
Julio's user avatar
  • 301
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, ...
coderodde's user avatar
  • 31.3k
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 ...
In78's user avatar
  • 663
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. ...
KrakenJaws's user avatar
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 ...
Koray Tugay's user avatar
  • 1,557

15 30 50 per page