FastFile released

Developed or developing a new product in PureBasic? Tell the world about it.
newbie
Enthusiast
Enthusiast
Posts: 296
Joined: Tue Jul 29, 2003 5:47 pm
Location: FRANCE
Contact:

Post by newbie »

thx Paul :wink:
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

Okay, next Beta of FastFile Libraries Version 4 available( download here)

from the history:

Optional Filepointer in all read/writing commands
Filepointer in Open/close commands
FastUseFile() Added
FastOpenFileRead() Added
FastReadString() Added
FastWriteString() Added
FastReadFloat() Added
FastWriteFloat() Added , whole Lib splitted
FastFileCRC32() and FastFileMD5() readonly

The FastFileText is not changed (execept that it is readonly), this work is for later :)

feel free to test (plz with backupfiles ) and report errors,critics and others (donations ;)) here or in the IRC-channel .
SPAMINATOR NR.1
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Help File

Post by NoahPhense »

I took the liberty of compiling you html.. for those that might want just a single help file.

Download Help File Here

- john
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

a small (bugfixed) update is here FastFile V4.2

This is the last version before i update to V5 (which is nearly ready for release, only the fine weather stops my work )
SPAMINATOR NR.1
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

:lol:
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Sweet *fingers crossed for bad weather*
Yian_The_Craft
User
User
Posts: 15
Joined: Sun Sep 12, 2004 6:41 am

Post by Yian_The_Craft »

I have a test.txt which is 4 lines:
1
2
3
4
but when I use that example code it only reads the 3 lines.If I make it 5 lines it only reads 4.
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

Yian_The_Craft wrote:I have a test.txt which is 4 lines:
1
2
3
4
but when I use that example code it only reads the 3 lines.If I make it 5 lines it only reads 4.
known bug (a missing CRLF at the last line) , should been for the next version.
SPAMINATOR NR.1
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

I'm getting a bug with 4.2 and dunno if it's already been found or if I'm doing something horribly wrong. Thought I'd mention it here. I've got a text file that is 3,560,918 bytes and it's filled with lines like (around 65537 lines):

69253293=57722345,12281923,41896350,85190632,78327595
8405792=74415561,56360749,40048898,41356995,88183293
74830558=32040838,94203399,92711169,37519720,2299895
73791813=30531672,72681100,22220704,50667884,30419886
83235894=80847585,25262185,21055261,4850284,55773614
56457653=91742162,20903141,10880654,80039553,89579687

... now whenever I cycle through it with FastOpenTextFile and try to read the last line, my program crashes. In fact, if I tell it to read past a certain point, it'll crash. Seems to happen just after 32767 or around there. Now take a look at the sample code I'm using to see if I'm making a really obvious mistake.

Code: Select all

Procedure.s TestRead(inFile.s)
      sLine.s
      iLoop.l
      countLines.l
      If FileSize(inFile) > -1
         countLines = FastOpenTextFile(inFile) 
         For iLoop = 1 To countLines+1
            sLine=FastReadLine(iLoop)
         Next
         FastCloseTextFile()
      EndIf
   ProcedureReturn sLine 
EndProcedure

If OpenWindow(0, 0, 0, 150, 150,  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "Test") 
   ;
   If CreateGadgetList(WindowID()) 
      ButtonGadget(5, 70, 135, 80, 15, "Test") 
   EndIf
   ;
   Repeat 
      Event = WaitWindowEvent() 
      If Event = #PB_EventGadget 
         GadgetID = EventGadgetID() 
         Select GadgetID
            Case 5
               t1=GetTickCount_()
               sTest.s=configGetValueTest("c:\test.txt")
               t2=GetTickCount_()
               MessageRequester("Result: "+StrU(t2-t1,2),sTest)
         EndSelect
      EndIf 
   Until Event = #PB_EventCloseWindow 
EndIf 

End 
So... any thoughts?
Yian_The_Craft
User
User
Posts: 15
Joined: Sun Sep 12, 2004 6:41 am

Post by Yian_The_Craft »

I am really needing fast file for my program,will there be a new version released?
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

yes, but i did not post the date here . you will have to wait , sorry

and which version do you need so fast ?
Fastfile or FastFiletext ?
SPAMINATOR NR.1
Yian_The_Craft
User
User
Posts: 15
Joined: Sun Sep 12, 2004 6:41 am

Post by Yian_The_Craft »

Both ;) Please
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

FastFileText V5 Beta :

New:
-Optional FileNumber (to load more than 1 File at same time)
-Optional separator
-Searchfunction (first version, not optimized)

(here downloadable)
SPAMINATOR NR.1
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Hi Rings and everybody,
Is it expected for PB File library to reach same speed that this lib soon?
Anyone knows? :?
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Rings wrote:a small (bugfixed) update is here FastFile V4.2

This is the last version before i update to V5 (which is nearly ready for release, only the fine weather stops my work )
You must be having very good weather where you live :)

Anyways, this will not work with Strings in a binary file as it requires the length of the string, which you cannot get unless you read it first... lol. I just found that funny :)

Also it does not work on Pentium 4s. It locks up the program on "FastOpenFile"
Post Reply