<commit_before>package openjpeg

// #cgo pkg-config: libopenjp2
// #include <openjpeg.h>
import "C"
import (
	"io"
	"reflect"
	"sync"
	"unsafe"
)

// These vars suck, but we have to have some way to find our objects when the
// openjpeg C callbacks tell us to read/seek/etc.  Trying to persist a pointer
// between Go and C is definitely more dangerous than this hack....
var nextStreamID uint64
var images = make(map[uint64]*JP2Image)
var imageMutex sync.RWMutex

// These are stupid, but we need to return what openjpeg considers failure
// numbers, and Go doesn't allow a direct translation of negative values to an
// unsigned type
var opjZero64 C.OPJ_UINT64 = 0
var opjMinusOne64 = opjZero64 - 1
var opjZeroSizeT C.OPJ_SIZE_T = 0
var opjMinusOneSizeT = opjZeroSizeT - 1

// storeImage stores the next sequence id on the JP2 image and indexes it in<commit_msg>Remove unused opjZero64 / opjMinusOne64<commit_after>package openjpeg

// #cgo pkg-config: libopenjp2
// #include <openjpeg.h>
import "C"
import (
	"io"
	"reflect"
	"sync"
	"unsafe"
)

// These vars suck, but we have to have some way to find our objects when the
// openjpeg C callbacks tell us to read/seek/etc.  Trying to persist a pointer
// between Go and C is definitely more dangerous than this hack....
var nextStreamID uint64
var images = make(map[uint64]*JP2Image)
var imageMutex sync.RWMutex

// These are stupid, but we need to return what openjpeg considers failure
// numbers, and Go doesn't allow a direct translation of negative values to an
// unsigned type
var opjZeroSizeT C.OPJ_SIZE_T = 0
var opjMinusOneSizeT = opjZeroSizeT - 1

// storeImage stores the next sequence id on the JP2 image and indexes it in
{'fraction_non_alphanumeric': 0.0763765541740675, 'fraction_numerical': 0.018946121965660152, 'mean_word_length': 3.8703170028818445, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4865319', 'n_tokens_mistral': 569, 'n_tokens_neox': 534, 'n_words': 232}