This Community site is new! Please help us build a community around the JNIOR.
Sign up, and help share your knowledge. Please sign-up even if you do not plan to post as a sign of support.
If there is evidence of a demand we will continue to develop the content here.

Search found 390 matches

by bscloutier
Wed Jan 31, 2018 9:05 am
Forum: Forum Support
Topic: Tabs in Code blocks
Replies: 0
Views: 20

Tabs in Code blocks

The Code and Java blocks that we are using at this point aren't bad. One thing worth tweaking is the tab expansion. I think it is using 8 spaces per tab. Since we work mainly in C or Java code, maybe it should use either 3 or 4 per tab. I try not to challenge the right hand margin when I code but th...
by bscloutier
Wed Jan 31, 2018 9:00 am
Forum: JANOS Operating System
Topic: DEFLATE Compression Algorithm
Replies: 68
Views: 704

Re: DEFLATE Compression Algorithm

This DEFLATE compression capability will be part of JANOS v1.6.4 and later OS. I am likely to do some optimization before release. Here we see that it works. I'll create an archive containing the files in my JNIOR's root folder. bruce_dev /> zip -c test.zip / 6 files saved bruce_dev /> bruce_dev /> ...
by bscloutier
Wed Jan 31, 2018 8:39 am
Forum: JANOS Operating System
Topic: DEFLATE Compression Algorithm
Replies: 68
Views: 704

Re: DEFLATE Compression Algorithm

First we stream the Block Header. The very first bit indicates whether or not the block is the last for the compression. For the last block this BFINAL bit will be a 1. It is 0 otherwise. We also are using the dynamic Huffman table type. The next two bits indicate the block type BTYPE. Here we use 1...
by bscloutier
Wed Jan 31, 2018 7:55 am
Forum: JANOS Operating System
Topic: DEFLATE Compression Algorithm
Replies: 68
Views: 704

Re: DEFLATE Compression Algorithm

The DEFLATE specification greatly oversimplifies the whole process by defining the block format in about a single page. We can now define the format of the block: 5 Bits: HLIT, # of Literal/Length codes - 257 (257 - 286) 5 Bits: HDIST, # of Distance codes - 1 (1 - 32) 4 Bits: HCLEN, # of Code Length...
by bscloutier
Tue Jan 30, 2018 4:05 pm
Forum: JANOS Operating System
Topic: DEFLATE Compression Algorithm
Replies: 68
Views: 704

Re: DEFLATE Compression Algorithm

We're going to output to a bit stream. Each write will likely involve a different number of bits. Someplace we have to properly sequence these into bytes to append to the output buffer. To do this we need one routine to write called _writeb() and one to use at the end to flush any remaining unwritte...
by bscloutier
Tue Jan 30, 2018 3:29 pm
Forum: JANOS Operating System
Topic: DEFLATE Compression Algorithm
Replies: 68
Views: 704

Re: DEFLATE Compression Algorithm

As before we will need to convey the code lengths in this 'cnttbl' to the decompressor. We have N = {3 0 6 6 4 3 4 4 4 4 3 3 4 5 0 0 6 5 6}. I mentioned earlier that these are stored each with 3 bits in the bit stream limiting the code length to 7 bits. But DEFLATE wants to save every possible byte....
by bscloutier
Tue Jan 30, 2018 3:06 pm
Forum: JANOS Operating System
Topic: DEFLATE Compression Algorithm
Replies: 68
Views: 704

Re: DEFLATE Compression Algorithm

The current version of jniorsys.log on my development JNIOR compresses into a single block using the following literal and distance tables. littbl 0x00a 2 11 11111101110 0x00d 2 12 111111111000 0x020 93 6 101000 0x027 4 11 11111101111 0x028 14 9 111101010 0x029 3 11 11111110000 0x02a 2 12 1111111110...
by bscloutier
Tue Jan 30, 2018 2:47 pm
Forum: JANOS Operating System
Topic: DEFLATE Compression Algorithm
Replies: 68
Views: 704

Re: DEFLATE Compression Algorithm

So to review.... First, we covered how to perform a reasonably fast version of LZ77. This filling a 64 KB buffer with compressed data which contains literals and length-distance codes. When we need to we will flush the 64 KB buffer and generate a block of DEFLATE format. At that point we call a rout...
by bscloutier
Tue Jan 30, 2018 1:56 pm
Forum: JANOS Operating System
Topic: DEFLATE Compression Algorithm
Replies: 68
Views: 704

Re: DEFLATE Compression Algorithm

The complete procedure for generating a DEFLATE format compatible Huffman table limited to a maximum bit depth is shown here. I know that this is not optimized code. There is some unnecessary execution but I had wanted to keep steps separate and clear. You can be sure that over time I will optimize ...
by bscloutier
Tue Jan 30, 2018 1:03 pm
Forum: JANOS Operating System
Topic: DEFLATE Compression Algorithm
Replies: 68
Views: 704

Re: DEFLATE Compression Algorithm

Adjust the Huffman Tree Accordingly We have created the optimum Huffman table for coding our data. Unfortunately we find out that it is not compatible for use with DEFLATE. The DEFLATE specification dictates that this particular table have a code length maximum of 7 bits. That being forced by the f...