Jump to content


Photo

BAM conversion


17 replies to this topic

#16 Nythrun

Nythrun

    Long since out to pasture

  • Modders
  • 1761 posts
  • Gender:Female

Posted 06 May 2008 - 05:14 PM

Does CLEAR_MEMORY wipe out the zlib library too, or no?

If it did
OUTER_PATCH list BEGIN
  WRITE_BYTE 0 0
  READ_ASCII 0 0t_0 (1)
END
OUTER_SPRINT list ~~
<<<<<<<<unprocessed_list.txt
%list%>>>>>>>>
COPY_EXISTING_REGEXP ~^.+\.bam$~ nowhere
  TO_LOWER SOURCE_RES
  SNPRINT 8 item ~%SOURCE_RES%%0t_0%%0t_0%%0t_0%%0t_0%%0t_0%%0t_0%%0t_0%%0t_0%~
  SPRINT  list ~%list%%item%~
BUT_ONLY
COPY +  unprocessed_list.txt processed_list.txt
  EVALUATE_BUFFER
OUTER_WHILE NOT FILE_SIZE unprocessed_list.txt 0 BEGIN
  COPY + unprocessed_list.txt unprocessed_list.txt
	READ_ASCII   0 bam
	DELETE_BYTES 0 8
  COPY_EXISTING ~%bam%.bam~ workspace
	DO_DECOMPRESSION_AND_OTHER_VOODUN
  CLEAR_MEMORY
END

in some form would spare the AT_NOW calls (hopefully with a better winnowed .bam list too :crazyeyes: )

Edited by Nythrun, 06 May 2008 - 05:17 PM.

"You tell lies, too."
"Not I." The witch laughed; her laughter was clear and yet unpleasant. "I used to as a child, I confess. But I soon found the truth more disconcerting."

#17 DavidW

DavidW
  • Gibberlings
  • 4140 posts
  • Gender:Male

Posted 06 May 2008 - 11:58 PM

Can you explain that to me in simple terms? - it looks great but it's over my head right now...

#18 Nythrun

Nythrun

    Long since out to pasture

  • Modders
  • 1761 posts
  • Gender:Female

Posted 07 May 2008 - 12:11 AM

Nah, it's really not :groucho:

I hate using temp files, but it may be a viable way out of CANNOT_GROW_BUFFER - which files have yet to be patched are stored in the unprocessed_list.txt file (which is just .bam resrefs null-padded to eight characters).

While unprocessed_list.txt has a file size not equal to zero, read a resref out of it, delete the eight bytes containing that resref, then do conversion routines on the resref.bam you've just pulled. CLEAR_MEMORY after each set of actions may (or may not) keep the zlib library from choking.

I'll give it a shot later, I'm just buried in work and flailing around uselessly for ideas :crazyeyes:
"You tell lies, too."
"Not I." The witch laughed; her laughter was clear and yet unpleasant. "I used to as a child, I confess. But I soon found the truth more disconcerting."



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users