• Binary Files

    From MCMLXXIX@VERT/MDJ to All on Thu May 15 03:14:32 2008
    writing ansi characters and strings to a binary file.
    I just can't seem to get it to work.

    I have an array of data that I want to write sequentially to a file that I can later load using Graphic.js. Is there a trick to using the binary file methods? base_64 conversion?


    ---
    þ Synchronet þ The BRoKEN BuBBLE (MDJ.ATH.CX)
  • From Deuce@VERT/SYNCNIX to MCMLXXIX on Thu May 15 04:29:31 2008
    Re: Binary Files
    By: MCMLXXIX to All on Wed May 14 2008 08:14 pm

    writing ansi characters and strings to a binary file.
    I just can't seem to get it to work.

    I have an array of data that I want to write sequentially to a file that I can later load using Graphic.js. Is there a trick to using the binary file methods? base_64 conversion?

    There are many many tricks! The best thing would be to add a save method to the Graphic class and email it to me so I can include it in CVS. :-)

    You can have a look at how Graphic_load() does it (one byte at a time using binary IO) for hints on how to do the save.

    Also, TheDraw will save in this format (it's called "RAW" or "C" or something like that)

    ---
    Synchronet - Jump on the Web 0.2 bandwagon!

    ---
    þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From MCMLXXIX@VERT/MDJ to Deuce on Thu May 15 23:51:49 2008
    Re: Binary Files
    By: Deuce to MCMLXXIX on Wed May 14 2008 21:29:31

    Re: Binary Files
    By: MCMLXXIX to All on Wed May 14 2008 08:14 pm

    writing ansi characters and strings to a binary file.
    I just can't seem to get it to work.

    I have an array of data that I want to write sequentially to a file that can later load using Graphic.js. Is there a trick to using the binary fil methods? base_64 conversion?

    There are many many tricks! The best thing would be to add a save method to the Graphic class and email it to me so I can include it in CVS. :-)

    You can have a look at how Graphic_load() does it (one byte at a time using binary IO) for hints on how to do the save.

    Also, TheDraw will save in this format (it's called "RAW" or "C" or somethin like that)


    sent... It's a mediocre solution, at best.. but it's what worked for me.. graphic_load() was useless, as far as helping get it done. I don't think my function handles attributes.


    ---
    þ Synchronet þ The BRoKEN BuBBLE (MDJ.ATH.CX)