Author Topic: .1 Second decompressor  (Read 7222 times)

0 Members and 3 Guests are viewing this topic.

Offline Halifax

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1334
  • Rating: +2/-1
    • View Profile
    • TI-Freakware
.1 Second decompressor
« on: August 21, 2006, 02:28:00 pm »
Ok here is the code and syntax
c1-->
CODE
ec1
Ans->C
instring(Str1,"/",C->D
instring(Str1,"/",D+1->E
sub(Str1,D+1,E-2->Str2
String>Equ(Str2,Y1
Y1->[J]
c2
ec2
Str1 = "/[[1,1,1,1][2,2,2,2][3,3,3,3][4,4,4,4]]/"

You will have to read the code to understand the parameter cause I can't explain it that good online but just look at the code its very simple. This may not be a compressor routine wise but a 40x40 matrix is 14411 bytes but a list with the same matrix is 3332 bytes in a string!!!!!That means u could transfer four 40x40 matrices in a string and it will take less bytes than one matrix. So you can decompress that matrix in .1 seconds.
There are 10 types of people in this world-- those that can read binary, and those that can't.

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
.1 Second decompressor
« Reply #1 on: August 21, 2006, 02:58:00 pm »
Not to be mean but this isn't really compressing, in the program you are taking up more space than the orig. matrix. When you compare the stored byte value of str1 and [A], they are two types of data formats. In a program if you store [A] into [A] it will be less bytes and faster than what you have suggested. Hope this explains it for you.

Offline Halifax

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1334
  • Rating: +2/-1
    • View Profile
    • TI-Freakware
.1 Second decompressor
« Reply #2 on: August 21, 2006, 03:07:00 pm »
No I don't understand what you are saying.
QUOTE
This may not be a compressor routine wise

I know it's not a compressor
There are 10 types of people in this world-- those that can read binary, and those that can't.

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
.1 Second decompressor
« Reply #3 on: August 21, 2006, 03:08:00 pm »
QuoteBegin-Killerplayer+21 Aug, 2006, 21:07-->
QUOTE (Killerplayer @ 21 Aug, 2006, 21:07)
No I don't understand what you are saying.
QUOTE
This may not be a compressor routine wise

I know it's not a compressor  

 I meant this isn't forming a compression, you said it was a decompressor.  

Offline Halifax

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1334
  • Rating: +2/-1
    • View Profile
    • TI-Freakware
.1 Second decompressor
« Reply #4 on: August 21, 2006, 03:10:00 pm »
ic wrong words sorry, but anyways can you explain that thing again cause it still doesnt make sense

EDIT: Nvm I get it but thats the point you don't put the string into a program you have that as a thing the user has to send then you use that to get it into a matrix for the alloted time needed then discard the matrix and you will still have it in string format. Because you can send 5 1000 byte stings and that will be 20 12x8 matrices
There are 10 types of people in this world-- those that can read binary, and those that can't.

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
.1 Second decompressor
« Reply #5 on: August 21, 2006, 03:18:00 pm »
Well, you are saying it is smaller once stored, which is correct ([A] being 14411 and str1 being 3332 as you said). But when it is sitting inside a program it is the same size as it being:
c1-->
CODE
ec1:"[[1,1,1][1,0,1][1,1,1]]
is more bytes than
:[[1,1,1][1,0,1][1,1,1c2
ec2
So, basiclly once you have it in a program it is around the same size. But then you add your changing of str1 into Y1 and now into [A], which is adding to the size of the program and lessing the speed (not much at all, but adding ms). I am sorry if this doesn't make sense.

Offline Halifax

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1334
  • Rating: +2/-1
    • View Profile
    • TI-Freakware
.1 Second decompressor
« Reply #6 on: August 21, 2006, 03:20:00 pm »
No it does make sense but I'm saying you don't put it in a program you send the strings as if rhey are the matrices. You send no matrices or programs with matrices to the calculator then use the program to get the matrix you want then use it and then discard it by deleting it leaving 600 or so bytes not taken up by what the matrix would have taken up
There are 10 types of people in this world-- those that can read binary, and those that can't.

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
.1 Second decompressor
« Reply #7 on: August 21, 2006, 03:21:00 pm »
Ok, but most people have the matrixs (the levels) stored inside a program.

Offline Halifax

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1334
  • Rating: +2/-1
    • View Profile
    • TI-Freakware
.1 Second decompressor
« Reply #8 on: August 21, 2006, 03:23:00 pm »
I know but thats what this program is for so you don't have to do that and you can send 5 2000 byte strings(40 matrices) without the hassle of putting 40 matrices into programs
There are 10 types of people in this world-- those that can read binary, and those that can't.

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
.1 Second decompressor
« Reply #9 on: August 21, 2006, 03:26:00 pm »
Ok, well that makes this more practical. I guess I took it differently with the title, but I guess it is good that we had this discussion so that others know what this is meant for ;)wink.gif.

Offline Halifax

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1334
  • Rating: +2/-1
    • View Profile
    • TI-Freakware
.1 Second decompressor
« Reply #10 on: August 21, 2006, 03:28:00 pm »
Yea sorry the title was unclear I didnt mean for that
There are 10 types of people in this world-- those that can read binary, and those that can't.

threefingeredguy

  • Guest
.1 Second decompressor
« Reply #11 on: August 21, 2006, 06:22:00 pm »
QuoteBegin-kalan_vod+21 Aug, 2006, 21:18-->
QUOTE (kalan_vod @ 21 Aug, 2006, 21:18)
Well, you are saying it is smaller once stored, which is correct ([A] being 14411 and str1 being 3332 as you said). But when it is sitting inside a program it is the same size as it being:
c1-->
CODE
ec1:"[[1,1,1][1,0,1][1,1,1]]
is more bytes than
:[[1,1,1][1,0,1][1,1,1c2
ec2
So, basiclly once you have it in a program it is around the same size. But then you add your changing of str1 into Y1 and now into [A], which is adding to the size of the program and lessing the speed (not much at all, but adding ms). I am sorry if this doesn't make sense.  

 True, but when stored in memory, like in ANS/[A]/whatever, the string version is ~10 times smaller.

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
.1 Second decompressor
« Reply #12 on: August 21, 2006, 06:33:00 pm »
QuoteBegin-threefingeredguy+22 Aug, 2006, 0:22-->
QUOTE (threefingeredguy @ 22 Aug, 2006, 0:22)
QuoteBegin-kalan_vod+21 Aug, 2006, 21:18-->
QUOTE (kalan_vod @ 21 Aug, 2006, 21:18)
Well, you are saying it is smaller once stored, which is correct ([A] being 14411 and str1 being 3332 as you said). But when it is sitting inside a program it is the same size as it being:
c1-->
CODE
ec1:"[[1,1,1][1,0,1][1,1,1]]
is more bytes than
:[[1,1,1][1,0,1][1,1,1c2
ec2
So, basiclly once you have it in a program it is around the same size. But then you add your changing of str1 into Y1 and now into [A], which is adding to the size of the program and lessing the speed (not much at all, but adding ms). I am sorry if this doesn't make sense.

True, but when stored in memory, like in ANS/[A]/whatever, the string version is ~10 times smaller.  

 Yes, this is the conclusion we came to ;)wink.gif.

Offline lolje

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 299
  • Rating: +2/-0
    • View Profile
.1 Second decompressor
« Reply #13 on: August 21, 2006, 10:51:00 pm »
All right but what's the size of the matrix compared to the string-size when you use 2- or even 3,4,5-digit numbers? Would the string still be so much smaler?
83+/84+ xLIB projects
Age of culture II (~89%)

Contact: [email protected]

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
.1 Second decompressor
« Reply #14 on: August 22, 2006, 01:28:00 am »
QuoteBegin-lolje+22 Aug, 2006, 4:51-->
QUOTE (lolje @ 22 Aug, 2006, 4:51)
All right but what's the size of the matrix compared to the string-size when you use 2- or even 3,4,5-digit numbers? Would the string still be so much smaler?  

 It will make the string bigger, but the matrix would remain the same size.