Search found 4612 matches

by albert
May 27, 2019 1:50
Forum: General
Topic: CVS | CVSHORT BUG
Replies: 2
Views: 56

Re: CVS | CVSHORT BUG

cvshort returns 0 if you pass it a single byte.. cvshort returns signed value when passed 2 bytes. when you assign the cvshort to a ushort it returns correct ushort value. when you assign the cvshort to a ulongint it returns max ulongint - signed short value. instead of the ushort value. screen 19 d...
by albert
May 26, 2019 18:24
Forum: General
Topic: Squares
Replies: 6391
Views: 366799

Re: Squares

@Richard I found the bug in the compressor...It doesn't compress after all... CVS( "AA" ) returns 0 in every instance... The CVS function , is broken. it returns 0 for single chars and double chars... So it was assigning all the location pointers to element 0 Interesting!! it compresses wh...
by albert
May 26, 2019 18:03
Forum: General
Topic: CVS | CVSHORT BUG
Replies: 2
Views: 56

CVS | CVSHORT BUG

I found a bug in the cvs,cvshort functions.... It returns 0 for single chrs

I thought i had data compression accomplished , and then found the bug...

Code: Select all


screen 19

print cvs("A")
print cvshort("A")

print cvs("AA")
print cvshort("AA")

sleep
end

by albert
May 25, 2019 18:47
Forum: General
Topic: Squares
Replies: 6391
Views: 366799

DATA COMPRESSION

@Richard @Dodicat @CoderJeff I finally got "real-life" , lossless data compression.....But , I'm a little confused about writing the de-compression.. It turns out to be a simple Simon formula.. It only works on data sizes , less than 65,535 bytes. It uses ushort location pointers.. Richard...
by albert
May 24, 2019 20:37
Forum: General
Topic: Squares
Replies: 6391
Views: 366799

Re: Squares

@Dodicat I got the de-compressor working, but now it doesn't compress... if v1 > (2^63) then v1-= (2^63)+1 , was returning a e+18 value , so it was writing 0's into the string, which allowed it to compress. Declare Function compress_loop( chrs as string ) as string Declare Function decompress_loop( ...
by albert
May 24, 2019 18:55
Forum: General
Topic: Squares
Replies: 6391
Views: 366799

Re: Squares

@Dodicat I can't seem to get the de-compressor working.. Can you help?? Declare Function compress_loop( chrs as string ) as string Declare Function decompress_loop( chrs as string ) as string screen 19 dim as double time1,time2,time3,time4 do randomize dim as string s="" For n As Long = 1 ...
by albert
May 24, 2019 17:04
Forum: General
Topic: Squares
Replies: 6391
Views: 366799

Re: Squares

I figured out a formula.... But it takes like 200 loops to compress 90% I'm working on the de-compressor... Declare Function compress_loop( chrs as string ) as string Declare Function decompress_loop( chrs as string ) as string Namespace Zlibrary #inclib "zlib" Extern "C" Declare...
by albert
May 20, 2019 1:47
Forum: General
Topic: Need faster Exponentiate
Replies: 30
Views: 856

Re: Need faster Exponentiate

You can use my multiplier... It does a million digits in under a minute.. function mul_loop_7( num1 as string , num2 as string ) as string dim as string number1 = num1 dim as string number2 = num2 'make numbers equal multiple of 7 bytes dim as string str1 dim as longint dec1 do str1 = str(len(number...
by albert
May 19, 2019 19:05
Forum: General
Topic: Squares
Replies: 6391
Views: 366799

Data Compression

@Dodicat I need to find the stray "1's" that expand to "1111" See compress_loop() , I need to write a decompressor Declare Function compress_loop( chrs as string ) as string Declare Function decompress_loop( chrs as string ) as string screen 19 dim as double time1,time2,time3,tim...
by albert
May 18, 2019 2:20
Forum: General
Topic: Squares
Replies: 6391
Views: 366799

Re: Squares

@Richard I was trying to use the instr() function to search for the sets.. 10-10 has a 10 and 01 01-01 has a 01 and 10 01-10 solves out okay.. I've been racking my brain , how to solve it by stepping through the data.. Because it only uses a single 1 for the "11" set. you can't step throug...
by albert
May 18, 2019 1:07
Forum: General
Topic: Squares
Replies: 6391
Views: 366799

Re: Squares

@Richard The compressor works. I just can't figure out how to decompress it. I'll go ahead and post it. you have , stepping by 2 bits 00 01 10 1 So it turns 8 bits into 7 , so it compresses , and 11 is the most prolific set... so 10,000 compresses to under 9,000 on the first run. 10-01 has 00 10-10 ...
by albert
May 17, 2019 3:36
Forum: General
Topic: Squares
Replies: 6391
Views: 366799

Re: Squares

@Richard I got lossless compression working...Compresses 10,000 bytes , down to under 100 bytes.. I can't post the code.. I need to copyright it or patent it.. After several days and hours and hours of playing with the zlib compressor , I finally figured out how to trick it , into compressing random...
by albert
May 15, 2019 17:11
Forum: General
Topic: Squares
Replies: 6391
Views: 366799

Re: Squares

@Richard @Dodicat I came up with a "lossey Compression" it compresses down to 97%.. It turns the data into binary , and then replaces all the "00's" with "01's" The input data needs to be several kilobytes for it to compress.. it doens't work on hundreds... Declare Func...
by albert
May 13, 2019 23:26
Forum: General
Topic: Squares
Replies: 6391
Views: 366799

Re: Squares

@Richard

I figured out how to compress data to the maximum....You turn each byte into a number of zeros , or a number of ones.

A megabyte string , compresses down , to just a few bytes..
But you don't know where 1 byte ends and then next begins..If you put in a separator , it doesn't compress...
by albert
May 13, 2019 23:18
Forum: General
Topic: Squares
Replies: 6391
Views: 366799

Re: Squares

@Richard I thought i finally had compression... But the negatives were turning out to "0's". So every other number was 0.. I was getting partial rights... like 2 correct then 2 blanks and then 2 rights, i couldn't figure it out the problem.. Using ushort's it doesn't compress. Using BYTE ,...

Go to advanced search