MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
Re: [MUD-Dev] Rooms, 3D arrays, etc.
In <338C39B2.41C67EA6#iname,com>, on 05/28/97
at 09:00 AM, Shawn Halpenny <malachai#iname,com> said:
>I wonder at using some sort of RLE, since if you compressed the
>entire array, wouldn't you have to uncompress the first n elements in
>order to address some element deep into the array?
Nope. Consider how RLE works. You can read from teh start of the
conpressed region, extracting the extent of each repetition, summing
them, and thereby locating the exact location a specified element
falls in the compressed string.
eg The RLE string runs:
Format:
(flag)(character)(count)
0 -- the repetition flag
(0) (x) (20) (0) (y) (5) (A) (B) (C) (0) (z) (8) (D) (E) (0) (q)
(3)...
Whats the value of array[40]?
Just walk the string summing the repetitions etc, and you'll see its a
'q' -- no literal decompression required.
--
J C Lawrence Internet: claw#null,net
(Contractor) Internet: coder#ibm,net
---------------(*) Internet: clawrenc#cup,hp.com
...Honorary Member Clan McFUD -- Teamer's Avenging Monolith...
- Thread context:
- Rooms, 3D arrays, etc.,
Michael Hohensee michael#sparta,mainstream.net, Sun 25 May 1997, 20:28 GMT
- Re: [MUD-Dev] Rooms, 3D arrays, etc.,
coder coder#ibm,net, Mon 26 May 1997, 03:50 GMT
- Re: [MUD-Dev] Rooms, 3D arrays, etc.,
RHS Linux User michael#sparta,mainstream.net, Wed 28 May 1997, 01:29 GMT
- Re: [MUD-Dev] Rooms, 3D arrays, etc.,
Shawn Halpenny malachai#iname,com, Wed 28 May 1997, 20:57 GMT
- Re: [MUD-Dev] Rooms, 3D arrays, etc.,
clawrenc clawrenc#cup,hp.com, Thu 29 May 1997, 04:47 GMT
- Re: [MUD-Dev] Rooms, 3D arrays, etc.,
Nathan Yospe yospe#hawaii,edu, Mon 26 May 1997, 05:47 GMT
[ Other Periods
| Other mailing lists
| Search
]