Search found 5314 matches

by albert
Dec 15, 2019 22:42
Forum: General
Topic: Squares
Replies: 7362
Views: 443095

Yah-Zip

@StoneMonkey You got me thinking about the counting bits.... You count the number of set bits , then record every other bit , and then add in the last decimal digit.. ( 16 bits in , 16 bits out. ) It compresses... 16 bits input count = bit count vals1 = every other bit vals2 = right( decimal digit )...
by albert
Dec 13, 2019 0:42
Forum: General
Topic: Squares
Replies: 7362
Views: 443095

Re: Squares

@angros47 There are no quads dups , that start with "A0" , but there are some data sets that do start with "A0" Maybe making it "A" + left( quad 1 ) + "0~" ( "A 1 0 ~ ) then take out the "~" chrs. Maybe A + ? + 0 , probably almost never happens....
by albert
Dec 11, 2019 0:17
Forum: General
Topic: Squares
Replies: 7362
Views: 443095

Hex Zip

@Richard @Dodicat @StoneMonkey I got compression... Finally !! , it actually works.. The down side is ; it only compresses a small amount each loop. So it takes hours to compress 10,000,000 bytes.. The method is : Turn the input string into hex , and then search for quadruples n1 = "0000" ...
by albert
Dec 08, 2019 20:38
Forum: General
Topic: Squares
Replies: 7362
Views: 443095

Re: Squares

Thanks you guys.. How do you get the right answer??? cvl( str val ) is giving ( plus and minus ) I'm trying to get the positive 32 bit value.. screen 19 dim as string zeros = string( 32 , "0" ) dim as string rand1 dim as string rand2 do rand1 = chr( int( rnd * 256 ) ) + chr( int ( rnd * 25...
by albert
Dec 08, 2019 3:30
Forum: General
Topic: Squares
Replies: 7362
Views: 443095

Re: Squares

@Richard

How many permutations are there for "1234"

Is it 16 or 256 ??

1234
1243

1324
1342

etc... ??

Do you have a program , that can do the permutations for 4 chr()'s ??
by albert
Dec 07, 2019 22:59
Forum: General
Topic: Squares
Replies: 7362
Views: 443095

Re: Squares

My mistake..

I had outs1 + = mkl( count )

i need to make outs1 the same size as the input data.
And then split the outs1 string , and insert mkl( count ) into outs1 where it's supposed to go..

I'll fix it , and see if it still compresses..

( !~ Edited ~! )

Fixed it and it doesn't compress..
by albert
Dec 07, 2019 22:40
Forum: General
Topic: Squares
Replies: 7362
Views: 443095

Rand-Zip

@Richard @Dodicat @StoneMonkey I got another compression technique... It's kinda slow.. You generate , rand = mkshort( random ) , and check the file , to see if it exists in the file. If rand > mkshort( 0 ) then you increment the counter. The output is ; outs1 + = mkl( count ) , from observation , t...
by albert
Dec 05, 2019 23:31
Forum: General
Topic: Squares
Replies: 7362
Views: 443095

Re: Squares

@StoneMonkey

Disregard the above compressor....

There's duplicates.

"1" + bin( 3 ) + "1" + bin( 3 )

32 = 1-11-1-10
70 = 1-111-1-0

Both the same... and there's other duplicates...
by albert
Dec 05, 2019 2:44
Forum: General
Topic: Squares
Replies: 7362
Views: 443095

Yah-Zip ( 6 bit )

@Richard @Dodicat @StoneMonkey I decided to go ahead and post the code... ( Make it freeware ) "Yah-Zip.bas" Declare Function compress_loop( chrs as string ) as string Declare Function decompress_loop( chrs as string ) as string Namespace Zlibrary #inclib "zlib" Extern "C&qu...
by albert
Dec 05, 2019 1:51
Forum: General
Topic: Squares
Replies: 7362
Views: 443095

Re: Squares

I got the compressor doing 1,000,000 in 98 seconds.. ( shaved off 40 seconds ) 5,000,000 takes 460 seconds ( instead of 540 ) ( shaved off 100 seconds ) Got to speed it up more.... ============================================================= What's the fastest way to get 6 bits?? Is there a faster ...
by albert
Dec 05, 2019 1:27
Forum: General
Topic: Squares
Replies: 7362
Views: 443095

Re: Squares

I got to find a way to speed it up.. 1,000,000 takes 130 seconds 5,000,000 takes 540 seconds 4x ( a normal song ( 3.5 to 4 minutes) *.mp3 ) 9 minutes is too long... A movie file ( 4 gigabytes ) , would take a month to compress.. Before i work on the decompression , i need to speed the compressor up...
by albert
Dec 04, 2019 22:39
Forum: General
Topic: Squares
Replies: 7362
Views: 443095

Re: Squares

@Richard I finally got a method that will work.. It's a simple Simon solution.. ( 0 to 63 ) I just have to hard wire the values , into the de-compressor.. I should have it done , in a couple days.. For 100 loops : Compresses 1,000 10% Compresses 10,000 90% Compresses 100,000 98% ( takes 9 to 11 seco...
by albert
Dec 04, 2019 1:04
Forum: General
Topic: Squares
Replies: 7362
Views: 443095

Re: Squares

@StoneMonkey

0x and x0 are solved by

if v1 < v2 then bins+= "0" else bins+= "1"


I worked out a new formula , but it takes 400 loops to get 90% compression..
by albert
Dec 03, 2019 2:30
Forum: General
Topic: Squares
Replies: 7362
Views: 443095

Mul-Zip

@Dodicat @StoneMonkey Here's my solution... if v1 = 0 and v2 = 0 then vals = "00" : goto done if v1 = 0 and v2 = 1 then vals = "01" : goto done if v1 = 0 and v2 = 2 then vals = "02" : goto done if v1 = 0 and v2 = 3 then vals = "03" : goto done if v1 = 0 and v2...
by albert
Dec 03, 2019 2:00
Forum: General
Topic: Squares
Replies: 7362
Views: 443095

Re: Squares

@Dodicat
@StoneMonkey

I got a solution worked out... Just have to write the decompression , before i post..

Compresses 1,000 , 10,000 , 100,000 , 1,000,000 , all 90+% after 100 loops..

I might need some help with the decompression.. I'll try to do it on my own..

Go to advanced search