ZLib Compose txt file please?
Blitz3D Forums/Blitz3D Programming/ZLib Compose txt file please?
| ||
Could somebody help me just read a text file and compose the text file? |
| ||
Why don't you try using WriteLine$ and ReadLine$ ? Just look at the Help- Command Reference under 2D WriteLine$ (filehandle|stream, string$) Once you've opened a disk file (or stream) for writing, use this command to right a whole line of text to the file. Each line of text is automatically terminated with an "end-of-line" mark, consisting of a Carriage Return character followed by a LineFeed character. (i.e. 0Dh, 0Ah ) This function can be used to make plain text files. |
| ||
I want to compress a Data file |
| ||
Something like this might work:;Read a file... file=OpenFile("C:\junk.txt") While Not Eof(file) Hold$ = ReadLine$(file) DebugLog Hold$ Wend CloseFile(file) ;Write to a file... MyFileName$ = "C:\junk.txt" fileout = WriteFile(MyFileName$) WriteLine(fileout), "Hello World!" CloseFile(fileout) |
| ||
no point in "compressing data files", memory and disk space virtually unlimited nowadays. If you want to make something "secret" or "private" just use a simple letter formula value shifter- it will look like gibberish in a text file. |
| ||
.. sorry, wrong forum |