From 79acaa8747d0db7b4b7c6c99698b37091860e126 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Sun, 15 Sep 2013 03:37:35 -0700 Subject: [PATCH] version bump 0.2.0: cstr/wstr --- cfb.js | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cfb.js b/cfb.js index 36220a8..4133f93 100644 --- a/cfb.js +++ b/cfb.js @@ -102,6 +102,13 @@ function ReadShift(size, t) { case 'utf8': size = t; o = this.utf8(this.l, this.l + size); break; case 'utf16le': size = 2*t; o = this.utf16le(this.l, this.l + size); break; + + case 'cstr': size = 0, o = ""; + while((w=this.readUInt8(this.l + size++))!=0) o+= String.fromCharCode(w); + break; + case 'wstr': size = 0, o = ""; + while((w=this.readUInt16LE(this.l +size))!=0) o+= String.fromCharCode(w),size+=2; + size+=2; break; } this.l+=size; return o; } diff --git a/package.json b/package.json index 59c46c6..d2974a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cfb", - "version": "0.1.0", + "version": "0.2.0", "author": "Niggler", "description": "Compound File Binary File Format extractor", "keywords": [ "cfb", "compression", "office" ],