Author Topic: String/list compression in basic  (Read 2571 times)

0 Members and 1 Guest are viewing this topic.

Offline josephmarin

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 186
  • Rating: +0/-0
  • Shiny, lets be bad guys
    • View Profile
String/list compression in basic
« on: July 12, 2007, 08:34:00 pm »
I'll be needing some compression for FFROS, as you know dialog is a large chunk of bytes. So string compression would be usefu, and im worthless with compression. Could someone show me how it would be done? code would be appreciated. Thanks!
Burn the land, boil the sea, you can't take the sky from me

Offline trevmeister66

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1009
  • Rating: +14/-5
    • View Profile
String/list compression in basic
« Reply #1 on: July 13, 2007, 05:10:00 am »
Here is how you do string - list:
seq(Instring("ABCD...",sub(str1,A,1)),A,1,length(str1)-> L1

EDIT:
Here is a way to convert the list to string:
ClrHome
" /->/ Str2
"ABCDEFGHIJKLMNOPQRSTUVWXYZ? ./->/Str1
For(A,1,dim(L1
Str2 + sub(Str1,L1(A),1 /->/Str2
End
Projects:    nameless RPG: 1.0%  |  Reverse Snake v1.5: 100%  |  Secret Project: 5%  |  DUNGEON: 70%

My MW2 Blog <-- Please visit :)

Insanity

  • Guest