HashData.dat

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
FarSight
Posts: 1
Joined: 2004-04-30 07:30

HashData.dat

Post by FarSight » 2004-04-30 08:07

Hi
First .. thx for hash'es !
Second ... im making external program to maintain my share and dl queue ... now it can:
- check my share for doubled files and delete all dubles (using HashIndex.xml)
- analyze queue.xml and delete from it all <Download Target> i already have on share (comparing HashIndex.xml and queue.xml)
- analyze queue.xml and delete from it all <Download Target> i ever had on my share (if i had and now havent = i dont need it) (comparing HashIndex.xml and queue.xml)
- analyze queue.xml and delete doubled <Download Target> (if TempTarget already exist it leaves biggest) , it can attach <Source> from doubled <Download Target> if they are different.

My question: what data is stored in "HashData.dat"?? i know that first 8 bytes are adress of next write position and for each hash is 24 bytes long data. But as far as i know in this file and HashIndex.xml are stored data about all files ever hashed and those files grow fast (now about 20 megs each) ... i wish to defrag them ... eg. copy info about nonexistant files to other place xml/mdb/sql and delete all entrances about nonextstant files from HashIndex.xml and HashData.dat (and change <Index> values in HashIndex.xml then defrag HashData.dat to wipe free space)

Thx
PS. My english sux like my programing skills :D

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-04-30 20:29

DC++ itself has a facility for compacting the hash database: /rebuild.

It was mentioned in the changelog. ;)

Also, some of those features are on the request list for DC++ itself - at least not downloading files you already have (or have queued), so if you have skill with C++, your contribution would be most welcome.

Locked