diff options
author | Jakob Unterwurzacher | 2016-07-02 15:33:48 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-07-02 15:35:06 +0200 |
commit | 04ad0635159150409252f6901463768008802221 (patch) | |
tree | c9cfe215fef896916cabeee130159e48077d3968 /internal/contentenc | |
parent | 7b22b426b9f5e68a0ff51799e04f193dc74586d0 (diff) |
fusefronted: move Truncate() and Allocate() to their own file
These are large complicated implementations that will share some
code.
Diffstat (limited to 'internal/contentenc')
-rw-r--r-- | internal/contentenc/intrablock.go | 2 | ||||
-rw-r--r-- | internal/contentenc/offsets.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/contentenc/intrablock.go b/internal/contentenc/intrablock.go index ec9562d..9a22ea2 100644 --- a/internal/contentenc/intrablock.go +++ b/internal/contentenc/intrablock.go @@ -4,7 +4,7 @@ package contentenc type intraBlock struct { BlockNo uint64 // Block number in file Skip uint64 // Offset into block plaintext - Length uint64 // Length of data from this block + Length uint64 // Length of plaintext data in this block fs *ContentEnc } diff --git a/internal/contentenc/offsets.go b/internal/contentenc/offsets.go index 256ea26..ebafe9b 100644 --- a/internal/contentenc/offsets.go +++ b/internal/contentenc/offsets.go @@ -76,7 +76,7 @@ func (be *ContentEnc) ExplodePlainRange(offset uint64, length uint64) []intraBlo nextBlock.BlockNo = be.PlainOffToBlockNo(offset) nextBlock.Skip = offset - be.BlockNoToPlainOff(nextBlock.BlockNo) - // Minimum of remaining data and remaining space in the block + // Minimum of remaining plaintext data and remaining space in the block nextBlock.Length = MinUint64(length, be.plainBS-nextBlock.Skip) blocks = append(blocks, nextBlock) |