• Stars
    star
    498
  • Rank 88,494 (Top 2 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 11 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Java library for efficiently working with heap and off-heap memory

Slice

Maven Central javadoc

Slice 2.0

Slice is a Java library for efficiently working with Java byte arrays. Slice provides fast and efficient methods such as read a long at an index without having to assemble the long from individual bytes. In addition to reading and writing single private values, there are methods to bulk transfer data to and from primitive arrays.

IO Streams

Slice provides classes for interacting with InputStreams and OutputStreams. The classes support the same fast single primitive access and bulk transfer methods as the Slice class.

UTF-8

Slice provides a library for interacting UTF-8 data stored in byte arrays. The UTF-8 library provides functions to count code points, substring, trim, case change, and so on.

Unsafe Usage

The Slice Library uses sun.misc.Unsafe to bulk transfer data between byte arrays and other array types directly as there is no other way to do this in Java today. The proposed Memory Access API (JEP 370) may provide support for this feature, and assuming performance is good, this library will be updated to use once it is available. Due to the direct usage of Unsafe, this library can only be used on a little endian CPU.

Legacy Slice

Version of Slice before 2.0 support off-heap memory and can be backed by any Java primitive array type. These features were rarely used, and were removed in version 2.0 to simplify the codebase. If you need these versions, they are available in the release-0.x branch.

More Repositories

1

airline

Java annotation-based framework for parsing Git like command line structures
Java
848
star
2

airlift

Airlift framework for building REST services
Java
567
star
3

aircompressor

A port of Snappy, LZO, LZ4, and Zstandard to Java
Java
530
star
4

drift

An annotation-based Java library for creating Thrift serializable types and services.
Java
235
star
5

jvmkill

Terminate the JVM when resources are exhausted
C
176
star
6

procname

Set process name for Java on Linux
C
96
star
7

codestyle

Code style for Airlift projects
66
star
8

bytecode

High-level Java library for generating JVM bytecode
Java
61
star
9

discovery

Discovery Server
Java
53
star
10

airbase

Base POM for Airlift
47
star
11

airship

Airship is a software deployment and management tool
Java
32
star
12

command

Convenience library for executing external processes
Java
18
star
13

stackfold

Fold related stacks in Java thread dumps
Java
13
star
14

units

Java library for immutable human-friendly units
Java
12
star
15

testing-postgresql-server

Embedded PostgreSQL server for use in tests
Java
9
star
16

testing-mysql-server

Embedded MySQL server for use in tests
Java
7
star
17

astack

Capture JVM thread dumps without requiring safepoints
C++
6
star
18

parameternames

Utility methods for fetching Java method or constructor parameter names
Java
6
star
19

floatingdecimal

Fix monitor contention issues in OpenJDK's FloatingDecimal
Java
5
star
20

resolver

Resolve the dependencies of Maven coordinates or POM file
Java
5
star
21

airlift-rack

Airlift Rack
Ruby
3
star
22

gcwatch

Monitor the JVM for stop-the-world GC pauses
C++
3
star
23

junit-extensions

Extensions for JUnit 5
Java
1
star
24

joda-to-java-time-bridge

Java
1
star