Posts: 3,522
Threads: 189
Joined: Dec 2003
You can find them both and more info here:
http://plantasy.darkwizard.org/
Enjoy..
Posts: 3,522
Threads: 189
Joined: Dec 2003
TPK update to version 3.1.2, again, incompatible with older version.
Sorry for any inconvenience..
Information and download:
http://plantasy.darkwizard.org/tpk/
Posts: 3,522
Threads: 189
Joined: Dec 2003
Small fix added
Version is still 3.1.2, backwards compatible
This release fixes an issue with zLIB compressed files being larger than the original.
Posts: 3,522
Threads: 189
Joined: Dec 2003
A simple DBASE maker utility
http://goddess.selfip.com/fvtools/DBase%...20v1.0.zip
Source:
Code:
'fbcs: C:-g
option explicit
#include "TPK.BI"
dim handle as DBASE
dim as string t, g
dim as integer a, numf, result, b, longest
dim as uinteger totalS, totalDS
print "FieldView DBase Maker v1.0"
redim flist(10000) as string
mkdir "Pack"
chdir "Pack"
print
print "Creating file list..."
print
shell "DIR *.* /S /-P /ON /A-D /-D /B /-C /-N /-Q /-W /-X > PACKLIST"
open "PACKLIST" for input as #1
do until eof(1)
line input #1, t$
for a = 1 to len(t$)-6
g$ = mid(t$, a, 6)
if lcase(g$) = "\pack\" or lcase(g$) = "/pack/" then
t$ = right(t$, len(t$)-(a+5))
exit for
end if
next
if t$ <> "PACKLIST" then
flist(numf) = t$
if len(t$) > longest then longest = len(t$)
numf += 1
end if
loop
close #1
kill "PACKLIST"
if numf = 0 then end
numf -= 1
print "Adding files to DBASE"
print
handle = DBASE_Create
for a = 0 to numf
result = DBASE_AddFile( @handle, flist(a) )
if result then
print "ERROR:"
print DBASE_Error
DBASE_Free @handle
sleep
end
end if
next
print DBASE_Entries(handle);" files added."
print
print "Compressing:"
if longest > 53 then longest = 53
for a = 0 to numf
t$ = flist(a)
do while len(t$) > 48
if instr(t$, "\")<>0 or instr(t$, "/")<>0 then
for b = 1 to len(t$)
if mid(t$, b, 1) = "/" or mid(t$, b, 1) = "\" then
t$ = right(t$, len(t$)-b)
exit for
end if
next
else
t$ = right(t$, 48)
end if
loop
if len(t$) < len(flist(a)) then t$ = "[...]"+t$
print " ";t$;
result = DBASE_Compress( @handle, flist(a) )
if result then
print
print "ERROR:"
print DBASE_Error
DBASE_Free @handle
sleep
end
end if
b = DBASE_Find( handle, flist(a) )
print tab(longest+3);cint((DBASE_Entry_DBSize(handle, b)+1) / (DBASE_Entry_Size(handle, b)+1) * 100000)/1000;"%"
totalS += DBASE_Entry_Size(handle, b)
totalDS += DBASE_Entry_DBSize(handle, b)
next
print "Overall:";cint((totalDS+1)/(totalS+1)*100000)/1000;"%"
print
print "Storing to disk."
DBASE_Store( @handle, "..\Pack.dbase" )
print
print "Freeing DBASE from memory."
DBASE_Free @handle
print
print "All done."
sleep
EDIT: There are still bugs regarding the zLib compression. To be on the safe side, stay off the compression routine until I've found and killed the bug..
Posts: 3,522
Threads: 189
Joined: Dec 2003
Bug should be fixed, if you experience problems with compressed data let me know..
5th post in a row, w00t..