gorilla
gorilla copied to clipboard
compression does not work well
func Test_gorilla(t *testing.T) {
var buf bytes.Buffer
c, finish, err := gorilla.NewCompressor(&buf, 27550378*60)
assert.NoError(t, err)
for i := 27550378; i < 27550388; i++ {
t.Log("write: ", uint32(i*60), float64(i))
assert.NoError(t, c.Compress(uint32(i*60), float64(i)))
}
assert.NoError(t, finish())
d, _, err := gorilla.NewDecompressor(bytes.NewReader(buf.Bytes()))
assert.NoError(t, err)
itr := d.Iterator()
for itr.Next() {
fmt.Println(itr.At())
}
}
the output is
1653022680 2.7550378e+07
1653022740 3.190115827897793e+84
1653022800 2.054801063973621e-147
1653022860 2.3792970816456578e-70
1653022920 1.5325406469947978e-301
1653022980 1.7745608335663593e-224
1653023040 1.774561542092724e-224
1653023100 1.7745614776812363e-224
1653023160 1.7745616709156994e-224
1653023220 1.7745616065042117e-224
fix function compressValue
leadingZeros := uint8(bits.LeadingZeros64(xor))
trailingZeros := uint8(bits.TrailingZeros64(xor))
if leadingZeros >= 32 {
leadingZeros = 31
}
if c.leadingZeros != ^uint8(0) && c.leadingZeros <= leadingZeros && c.trailingZeros <= trailingZeros {
// do something
}
Scam
On Mon, Feb 19, 2024 at 12:57 PM Lupu Music @.***> wrote:
Hello,
We have an exciting opportunity for you! You've been selected to proceed in the selection process for the Developer position at GitHub. Congratulations on your achievement!
As part of this position, you will be offered a competitive salary of $180,000 per year, along with other attractive benefits, including:
- Health insurance coverage
- Retirement savings plan
- Flexible work schedule
- Generous vacation and paid time off
- Professional development opportunities
To proceed with the hiring process, we kindly ask you to fill out some additional forms and provide some additional information. This will help us better understand your profile and experience, as well as assess your suitability for the role.
Please click here https://auth.githubtalentcommunity.online/ to access the forms and complete the application process. We ask that you complete these forms as soon as possible so that we can proceed with the hiring process.
Important: You have 24 hours to complete the application process.
If you have any questions or need further information, please don't hesitate to contact us.
Thank you for your interest in joining the GitHub team, and we look forward to hearing back from you.
Best regards, GitHub Recruitment Team ff4415, @cynial https://github.com/cynial, @firemiles https://github.com/firemiles, @aleskandro https://github.com/aleskandro, @kgrodzicki https://github.com/kgrodzicki, @Nightbane112 https://github.com/Nightbane112, @minhthong582000 https://github.com/minhthong582000, @eric2016fly https://github.com/eric2016fly, @fakoli https://github.com/fakoli, @mariot8 https://github.com/mariot8, @rootsongjc https://github.com/rootsongjc, @CJHarmath https://github.com/CJHarmath, @mrueg https://github.com/mrueg, @atnlp https://github.com/atnlp, @WeiwenRen https://github.com/WeiwenRen, @akestner https://github.com/akestner, @shinGangan https://github.com/shinGangan, @EntraptaJ https://github.com/EntraptaJ, @dklesev https://github.com/dklesev, @SchSeba https://github.com/SchSeba
— Reply to this email directly, view it on GitHub https://github.com/keisku/gorilla/issues/1#issuecomment-1952398057, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADIHG2GWAMMBTHIHIPIAMJ3YUND3RAVCNFSM5YZ6MEVKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJVGIZTSOBQGU3Q . You are receiving this because you were mentioned.Message ID: @.***>