Comparing version 1.4.1 to 1.4.2
@@ -0,0 +0,0 @@ import { FieldDescriptor } from './field-descriptor'; |
@@ -195,3 +195,4 @@ "use strict"; | ||
// If there is a memo file, open it and get the block size. Also get the total file size for overflow checking. | ||
// The code below assumes the block size is at offset 4 in the .dbt, and defaults to 512 if all zeros. | ||
// The code below assumes the block size is at offset 4 in the .dbt for dBase IV files, and defaults to 512 if | ||
// all zeros. For dBase III files, the block size is always 512 bytes. | ||
let memoBlockSize = 0; | ||
@@ -203,3 +204,3 @@ let memoFileSize = 0; | ||
await utils_1.read(memoFd, buffer, 0, 4, 4); | ||
memoBlockSize = buffer.readInt32LE(0) || 512; | ||
memoBlockSize = (dbf._version === 0x8b ? buffer.readInt32LE(0) : 0) || 512; | ||
memoBuf = Buffer.alloc(memoBlockSize); | ||
@@ -310,7 +311,7 @@ memoFileSize = (await utils_1.stat(dbf._memoPath)).size; | ||
} | ||
// Handle first/next block of dBase III memo data. | ||
// Handle first/next block of dBase IV memo data. | ||
else if (dbf._version === 0x8b) { | ||
// dBase IV memos start with FF-FF-08-00, then a four-byte memo length, which | ||
// includes eight-byte memo 'header' in the length. The memo length can be larger | ||
// than a block, so we loop over blocks until done. | ||
// includes the eight-byte memo 'header' in the length. The memo length can be | ||
// larger than a block, so we loop over blocks until done. | ||
// If this is the first block of the memo, then read the field length. | ||
@@ -317,0 +318,0 @@ // Otherwise, we must have already read the length in a previous loop iteration. |
@@ -0,0 +0,0 @@ import { FileVersion } from './file-version'; |
@@ -0,0 +0,0 @@ "use strict"; |
export declare type FileVersion = 0x03 | 0x83 | 0x8b | 0x30; | ||
export declare function isValidFileVersion(fileVersion: number): fileVersion is FileVersion; |
@@ -0,0 +0,0 @@ "use strict"; |
export { DBFFile, DBFFile as default } from './dbf-file'; | ||
export { FieldDescriptor } from './field-descriptor'; | ||
export { Options } from './options'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { FileVersion } from './file-version'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ /// <reference types="node" /> |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ For information about the dBase III (.dbf) file format, see: |
{ | ||
"name": "dbffile", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "Read and write .dbf (dBase III & Visual FoxPro) files in Node.js", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -0,0 +0,0 @@ # DBFFile |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
169545
733