From eb5391ccadfec03da2582556a9ea6255dce32e09 Mon Sep 17 00:00:00 2001 From: Frederic Langlet Date: Thu, 6 Jun 2024 11:04:52 -0700 Subject: [PATCH] Fix typos --- v2/entropy/AdaptiveProbMap.go | 2 +- v2/entropy/FPAQCodec.go | 2 +- v2/transform/EXECodec.go | 4 ++-- v2/transform/FSDCodec.go | 2 +- v2/transform/SBRT.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/v2/entropy/AdaptiveProbMap.go b/v2/entropy/AdaptiveProbMap.go index 73d49f7f..2e103214 100644 --- a/v2/entropy/AdaptiveProbMap.go +++ b/v2/entropy/AdaptiveProbMap.go @@ -69,7 +69,7 @@ func NewAdaptiveProbMap(mapType int, n, rate uint) (AdaptiveProbMap, error) { return newFastLogisticAdaptiveProbMap(n, rate) } - return nil, errors.New("Unknow APM type") + return nil, errors.New("Unknown APM type") } func newLogisticAdaptiveProbMap(n, rate uint) (*LogisticAdaptiveProbMap, error) { diff --git a/v2/entropy/FPAQCodec.go b/v2/entropy/FPAQCodec.go index b71f3831..bd30e66b 100644 --- a/v2/entropy/FPAQCodec.go +++ b/v2/entropy/FPAQCodec.go @@ -184,7 +184,7 @@ func (this *FPAQEncoder) BitStream() kanzi.OutputBitStream { } // Dispose must be called before getting rid of the entropy encoder -// This idempotent implmentation writes the last buffered bits into the +// This idempotent implementation writes the last buffered bits into the // bitstream. func (this *FPAQEncoder) Dispose() { if this.disposed == true { diff --git a/v2/transform/EXECodec.go b/v2/transform/EXECodec.go index 7c13f34f..1f144a22 100644 --- a/v2/transform/EXECodec.go +++ b/v2/transform/EXECodec.go @@ -425,7 +425,7 @@ func (this *EXECodec) forwardARM(src, dst []byte, codeStart, codeEnd int) (uint, if isBL == true { // opcode(6) + sgn(1) + offset(25) - // Absolute target address = srcIdx +/- (offet*4) + // Absolute target address = srcIdx +/- (offset*4) offset := int(int32(instr & _EXE_ARM_B_ADDR_MASK)) if instr&_EXE_ARM_B_ADDR_SGN_MASK == 0 { @@ -441,7 +441,7 @@ func (this *EXECodec) forwardARM(src, dst []byte, codeStart, codeEnd int) (uint, val = opcode1 | (addr >> 2) } else { // isCB == true // opcode(8) + sgn(1) + offset(18) + register(5) - // Absolute target address = srcIdx +/- (offet*4) + // Absolute target address = srcIdx +/- (offset*4) offset := (instr & _EXE_ARM_CB_ADDR_MASK) >> _EXE_ARM_CB_REG_BITS if instr&_EXE_ARM_CB_ADDR_SGN_MASK == 0 { diff --git a/v2/transform/FSDCodec.go b/v2/transform/FSDCodec.go index e32158fa..d1f43e62 100644 --- a/v2/transform/FSDCodec.go +++ b/v2/transform/FSDCodec.go @@ -180,7 +180,7 @@ func (this *FSDCodec) Forward(src, dst []byte) (uint, uint, error) { // Check several step values on a few sub-blocks (no memory allocation) count10 := count / 10 - count5 := 2 * count10 // count5=count/5 doest not guarantee count5=2*count10 ! + count5 := 2 * count10 // count5=count/5 does not guarantee count5=2*count10 ! in0 := src[0*count5:] in1 := src[2*count5:] in2 := src[4*count5:] diff --git a/v2/transform/SBRT.go b/v2/transform/SBRT.go index 3f88ea22..6ac3c687 100644 --- a/v2/transform/SBRT.go +++ b/v2/transform/SBRT.go @@ -25,7 +25,7 @@ import ( // SBR(alpha) is defined by sbr(x, alpha) = (1-alpha)*(t-w1(x,t)) + alpha*(t-w2(x,t)) // where x is an item in the data list, t is the current access time and wk(x,t) is // the k-th access time to x at time t (with 0 <= alpha <= 1). -// See [Two new families of list update algorihtms] by Frank Schulz for details. +// See [Two new families of list update algorithms] by Frank Schulz for details. // SBR(0)= Move to Front Transform // SBR(1)= Time Stamp Transform // This code implements SBR(0), SBR(1/2) and SBR(1). Code derived from openBWT