Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Object "Serialization" (script repost)

From: rgombert::essentiel::net at: 23-Feb-2001 0:59

Sorry... a few errors in the "comments" inside the script and the lack of indentation (due to outlook conersion of tabs to spaces), so I repost the script: REBOL [ Title: "Nom du script" File: %binutils.r Date: 22-Feb-2001 Author: "Renaud GOMBERT" Purpose: "Save and retrieve any word/value pair as binary" To-do: { Make a refinement to do compressions only if needed Allow processing of multiple word/value pairs at one time } Release: 0.0.1 Category: [] ] put-bin: func [ "Save word/value pair as compressed binary" 'data [any-type!] "word to process" filename [file!] "file to write to" /local temp ][ temp: make object! [ value: get data name: data ] write/binary filename compress to-binary mold temp ] get-bin: func [ "Load word/value pair from a compressed binary" filename [file!] "file to get word/value from" /local temp ][ temp: do decompress read/binary filename set temp/name temp/value ] Renaud GOMBERT email : [rgombert--essentiel--net] ICQ# 2602184