diff options
| author | pp <pp@455248ca-bdda-0310-9134-f4ebb693071a> | 2006-04-13 16:27:50 +0000 |
|---|---|---|
| committer | pp <pp@455248ca-bdda-0310-9134-f4ebb693071a> | 2006-04-13 16:27:50 +0000 |
| commit | 7376a3d5527ddeb3fa2c39cb4a3cdcef5512c741 (patch) | |
| tree | 73e6620bb42d15f45ba3e44704ad935cbb1fd45a | |
| parent | 6b448dcdc4bd84149fa9a1697325c7ae6867746a (diff) | |
- memory optimizations
git-svn-id: https://siedziba.pl:790/svn/repos/dbxrecover@229 455248ca-bdda-0310-9134-f4ebb693071a
| -rwxr-xr-x | dbxrecover | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -179,8 +179,6 @@ use strict; # it also helps in cases when there are dbx files contained inside dbx $self->{file}->seek($chunksize, 1); - $self->{hash} = undef; - ($self->{id}, $self->{chunksize}, $self->{datasize}, $self->{next}) = ($id, $chunksize, $datasize, $next); bless ($self, $class); return $self; } @@ -215,22 +213,23 @@ use strict; sub data { my $self = shift; + my $datasize = unpack("V", substr($self->{header}, 8, 4)); my $data; $self->{file}->setpos($self->{filepos}); - $self->{file}->read($data, $self->{datasize}); + $self->{file}->read($data, $datasize); return $data; } sub id { my $self = shift; - return $self->{id}; + return scalar unpack("V", $self->{header}); } sub next { my $self = shift; - return $self->{next}; + return scalar unpack("V", substr($self->{header}, 12, 4)); } } |
