github.com/TeaOSLab/EdgeNode@v1.3.8/internal/utils/bfs/block_info.go (about) 1 // Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 3 package bfs 4 5 type BlockInfo struct { 6 OriginOffsetFrom int64 `json:"1,omitempty"` 7 OriginOffsetTo int64 `json:"2,omitempty"` 8 9 BFileOffsetFrom int64 `json:"3,omitempty"` 10 BFileOffsetTo int64 `json:"4,omitempty"` 11 } 12 13 func (this BlockInfo) Contains(offset int64) bool { 14 return this.OriginOffsetFrom <= offset && this.OriginOffsetTo > /** MUST be gt, NOT gte **/ offset 15 }