Author Topic: [83+ BASIC] Compressors  (Read 14397 times)

0 Members and 1 Guest are viewing this topic.

Dragon__lance

  • Guest
[83+ BASIC] Compressors
« Reply #30 on: August 10, 2006, 04:37:00 am »
that's a great idea! i'm gonna try my own at compression now XDsmiley.gif I have a theory about strings......

Offline Halifax

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1334
  • Rating: +2/-1
    • View Profile
    • TI-Freakware
[83+ BASIC] Compressors
« Reply #31 on: August 10, 2006, 10:57:00 am »
lol that would be awesome but i hate make compressors it is so tedious
There are 10 types of people in this world-- those that can read binary, and those that can't.

Dragon__lance

  • Guest
[83+ BASIC] Compressors
« Reply #32 on: August 10, 2006, 01:43:00 pm »
@kalan_vod: well i actually made a working version of a RLE string compressor XDsmiley.gif .I think i get a slightly better compression ratio than with lists,but as far as run time goes......... (damn,howd u make yours go so fast :Dbiggrin.gif)

All i did was every 5 characters in the string is an element.So:
[1.4,0,0]
[11.4,2,2]

Becomes:

"101.420000111.420002"

I prefix the digits with 0's,and then leave the decimel.Then i put the RunLength of the data as a prefix to everything.I"m pretty sure it could be done to run very fast...but i'm not the person to do it.I'm having problems getting a stable version up.But i have a beta compressor and decompressor :)smile.gif

Decompressing is easy....but here's my theory for compressing.The only way to get a matrix into a list is via "Y="
Thus,all the user has to do is to recall the matrix in "Y1".Then via "equ->str",you can store it to a string.Then from there,just have to remove all the useless characters and reformat the elements :Dbiggrin.gif

If someone could help me make a decompresor(suprisingly having some difficulties to make it go faster),that'd be great.I'll release my compressor as soon as i work out the bugs.

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
[83+ BASIC] Compressors
« Reply #33 on: August 10, 2006, 03:01:00 pm »
Sounds great, but it seems it would have lots of wasted bytes due to the fact of having it sucluded to 5 numeric values, a better way IMO would be to have a charactor that is the divider of each value.

Dragon__lance

  • Guest
[83+ BASIC] Compressors
« Reply #34 on: August 10, 2006, 03:12:00 pm »
The extra character could be good or bad.If your matrix data doesn't have a lot of 2 digit numbers,then the extra character would work well and save some space.However if you use 2 digit decimal numbers constantly.......it'd be the other way around.It'd be cool if we could combine our 2 methods Kalan_vod.I'd like to see how fast a string can decompress XDsmiley.gif

Demon

  • Guest
[83+ BASIC] Compressors
« Reply #35 on: August 12, 2006, 06:26:00 am »
Last night  (after crashing and wiping out the RAM again) I decided to make a simple matrix compressor.  It's not that fast (on an 83+ anyway), but A 6x9  (659 byte) Matrix was compressed down to 64 bytes.  A 16x16 (2315 bytes)  265 bytes.  It's not finished yet, because I'm gonna try to make it do things like pattern matching to get even smaller than that.  Hopefully I remember to /back /this/ up/.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
[83+ BASIC] Compressors
« Reply #36 on: August 13, 2006, 12:14:00 pm »
ugh I hope you didnbt lost all progress on the image/sprite editor again >.<

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
[83+ BASIC] Compressors
« Reply #37 on: August 13, 2006, 01:22:00 pm »
QuoteBegin-pyro_xp2k+Aug 12 2006, 12:26 PM-->
QUOTE (pyro_xp2k @ Aug 12 2006, 12:26 PM)
Last night  (after crashing and wiping out the RAM again) I decided to make a simple matrix compressor.  It's not that fast (on an 83+ anyway), but A 6x9  (659 byte) Matrix was compressed down to 64 bytes.  A 16x16 (2315 bytes)  265 bytes.  It's not finished yet, because I'm gonna try to make it do things like pattern matching to get even smaller than that.  Hopefully I remember to /back /this/ up/.  

 What would the matric contain? (dont say numbers or digits :Ptongue.gif)

Offline Halifax

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1334
  • Rating: +2/-1
    • View Profile
    • TI-Freakware
[83+ BASIC] Compressors
« Reply #38 on: August 13, 2006, 03:31:00 pm »
Dude with my matrix compressor i did some RLE compression with it and had a 90% ratio!! But the sad thing is I can't write and RLE compressor with mines and make it go fast. So i will realese the source code and anyone who wants to edit can and use it whatever I don't care.
There are 10 types of people in this world-- those that can read binary, and those that can't.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
[83+ BASIC] Compressors
« Reply #39 on: August 14, 2006, 03:25:00 am »
O_Oshocked2.gif wow thats big compression

Demon

  • Guest
[83+ BASIC] Compressors
« Reply #40 on: August 14, 2006, 11:21:00 am »
QUOTE
QUOTE
Last night (after crashing and wiping out the RAM again) I decided to make a simple matrix compressor. It's not that fast (on an 83+ anyway), but A 6x9 (659 byte) Matrix was compressed down to 64 bytes. A 16x16 (2315 bytes) 265 bytes. It's not finished yet, because I'm gonna try to make it do things like pattern matching to get even smaller than that. Hopefully I remember to /back /this/ up/.


What would the matric contain? (dont say numbers or digits :Ptongue.gif)


Well, I guess it could be a map or something, but right now, the numbers can only be from 0 to 99 unless I find out what every single 1-byte token is that GraphLink will display and save.

But my compressor rocks now because it is no longer only a matrix compressor, it comresses lists, too, and then you have the option to  even compress the string the list or matrix is converted to. You you can take, say a 32x32 matrix with mostly zeros and some ones (maybe a map with a wall, but only a few obsticles in a middle), and compress it down to a 2- to 6-something byte string!  And the compressor/expander will automatically determine wheter a string you give it is just a normal string, is compressed data, or is "supercompressed", and will determine wheter it is a list or a matrix.

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
[83+ BASIC] Compressors
« Reply #41 on: August 14, 2006, 12:22:00 pm »
QuoteBegin-pyro_xp2k+Aug 14 2006, 05:21 PM-->
QUOTE (pyro_xp2k @ Aug 14 2006, 05:21 PM)
QUOTE
QUOTE
Last night (after crashing and wiping out the RAM again) I decided to make a simple matrix compressor. It's not that fast (on an 83+ anyway), but A 6x9 (659 byte) Matrix was compressed down to 64 bytes. A 16x16 (2315 bytes) 265 bytes. It's not finished yet, because I'm gonna try to make it do things like pattern matching to get even smaller than that. Hopefully I remember to /back /this/ up/.


What would the matric contain? (dont say numbers or digits :Ptongue.gif)


Well, I guess it could be a map or something, but right now, the numbers can only be from 0 to 99 unless I find out what every single 1-byte token is that GraphLink will display and save.

But my compressor rocks now because it is no longer only a matrix compressor, it comresses lists, too, and then you have the option to  even compress the string the list or matrix is converted to. You you can take, say a 32x32 matrix with mostly zeros and some ones (maybe a map with a wall, but only a few obsticles in a middle), and compress it down to a 2- to 6-something byte string!  And the compressor/expander will automatically determine wheter a string you give it is just a normal string, is compressed data, or is "supercompressed", and will determine wheter it is a list or a matrix.

Sounds nice, but I am unsure who your audience is? Also, I have targeted toward those who use xLIB. I am hoping you aren't taking this as a challenge....

Demon

  • Guest
[83+ BASIC] Compressors
« Reply #42 on: August 14, 2006, 12:43:00 pm »
Shoot, I don't even know.  In my mind, there's some people out there clapping, then there are some guys going [imitates murmuring] and then there are some others shaking their heads negatively like, "Meh.  Not exactly enough for us."  "Not exacly what we need."

o.oblink.gif:lol:bounce2.gif:Ptongue.gif:Dbiggrin.gif

As for the challenge... maybe I subconsiously thought it was, but consiously, I just wanted to make something potentially useful for somebody (and myself).

Dragon__lance

  • Guest
[83+ BASIC] Compressors
« Reply #43 on: August 15, 2006, 03:53:00 am »
ahhh,the compresion challenge begins :Dbiggrin.gif The one major thing that i would look for in the compression is Speed,not Size.Speed is more important for me,and i'd  like to see who can get out the fastest compressor! :Dbiggrin.gif

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
[83+ BASIC] Compressors
« Reply #44 on: August 15, 2006, 09:44:00 am »
guys please keep things nice, kalan he's trying his best and he's new (he joined the forum, like, 2 months ago I think?) i think his compressor is not aimed toward xlib tho, more pure basic. Anyway what I mean is to not start arguments about "who's compressor is better than whom" and stuff like "mine is better than yours", maybe we should just start a contest and compete here  :Swacko.gif (uhm was this idea suggested a few page ago anyway?)