From a860c7f069254417679b8343c57307f04f4f25b2 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Tue, 24 Jul 2018 23:47:57 +0000 Subject: [PATCH] Provide overview of gapstring --- gapstring/gapstring.go | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/gapstring/gapstring.go b/gapstring/gapstring.go index 1b71a4f..3140b9e 100644 --- a/gapstring/gapstring.go +++ b/gapstring/gapstring.go @@ -1,3 +1,15 @@ +/* +package netshovel/gapstring provides a GapString type, +which represents a byte array with gaps: holes with no data. +This is used by netshovel to represent +captured data streams with drops. + +Gaps are represented efficiently, +both in memory and in computation. +Several convenience functions exist +which operate on GapString data, +while preserving the gaps. +*/ package gapstring import ( @@ -41,13 +53,6 @@ func (c chunk) slice(a, b int) chunk { } // A GapString is a string with gaps of no data in the middle -// -// Gaps are represented efficiently, -// both in memory and in computation. -// -// Several convenience functions exist -// which operate on GapString data, -// while preserving the Gaps. type GapString struct { chunks []chunk }