view release on metacpan or search on metacpan
lib/Device/Hue.pm view on Meta::CPAN
if ($res->is_success) {
say $res->status_line
if $self->debug;
say Dumper(decode_json($res->decoded_content))
if $self->debug;
return decode_json($res->decoded_content);
} else {
say "Request failed: " . $res->status_line if $self->debug;
}
return;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Inverter/KOSTAL/PIKO.pm view on Meta::CPAN
$ua->show_progress(1);
}
my $response = $ua->request($request);
croak( "Could not fetch <$url>: " . $response->status_line )
unless $response->is_success;
$response->decoded_content;
}
sub get_current_status {
my $self = shift;
require Device::Inverter::KOSTAL::PIKO::Status;
view all matches for this distribution
view release on metacpan or search on metacpan
memory_map_2300.txt view on Meta::CPAN
047A 0 Start your read at 0479. Read 2 sets of 15.
047B 0 Store as a 30 byte array.
047C 0 What this is, is a rolling queue
047D 0 Each "impulse" is 0.0204" or 0.51826mm of rain.
047E 0 This measurement is simply (# impulses * unitOfMeasure)
047F 0 Exact encoding not yet decoded
0480 0 Rain 1h area
0481 0 Rain 1h area
0482 0 Rain 1h area
0483 0 Rain 1h area
0484 0 Rain 1h area
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Modem/UsRobotics.pm view on Meta::CPAN
=head1 WARNING
This module is not documented yet, and it is a rough work in progress.
Until now, it correctly reads voice/fax messages information, but when
saving voice messages to disk, sometimes they are incorrectly decoded.
So, if you need a working program, check out the good old TkUsr by
Ludovic Drolez, unless you want to help develop Device::Modem::UsRobotics.
=head1 DOCS TO BE COMPLETED FROM NOW.....
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Nest.pm view on Meta::CPAN
my $response = $self->{'ua'}->get($self->{'device_url'});
$self->{'last_code'} = $response->code;
if ($response->is_success) {
my $decoded_response = decode_json($response->content);
my $designation = ($decoded_response->{'thermostats'});
my @designation2 = keys(%$designation);
$self->{'thermostat'} = $designation2[0];
$self->{'thermostat_url'} = "https://developer-api.nest.com/devices/thermostats/".$self->{'thermostat'};
print "Thermostat designation: ".$self->{'thermostat'}."\n" if ($self->{'debug'});
my $response = $self->{'ua'}->get("https://developer-api.nest.com/structures?auth=".$self->{'auth_token'});
$self->{'last_code'} = $response->code;
if ($response->is_success) {
my $decoded_response = decode_json($response->content);
my @designation = keys(%$decoded_response);
$self->{'structure'} = $designation[0];
$self->{'struct_url'} = "https://developer-api.nest.com/structures/".$self->{'structure'}."?auth=".$self->{'auth_token'};
print "Structure Designation: ".$self->{'structure'}."\n" if ($self->{'debug'});
return 1;
} else {
lib/Device/Nest.pm view on Meta::CPAN
my $response = $self->{'ua'}->get($self->{'struct_url'});
$self->{'last_code'} = $response->code;
if ($response->is_success) {
my $decoded_response = decode_json($response->content);
return $decoded_response->{'away'};
} else {
print "Nest->fetch_Away_State(): Failed with return code ".$self->get_last_code()."\n";
return 0;
}
}
lib/Device/Nest.pm view on Meta::CPAN
my $response = $self->{'ua'}->get($self->{'struct_url'});
$self->{'last_code'} = $response->code;
if ($response->is_success) {
my $decoded_response = decode_json($response->content);
return $decoded_response->{$self->{'structure'}}->{'country_code'};
} else {
print "Nest->fetch_Country_Code(): Failed with return code ".$self->get_last_code()."\n";
return 0;
}
}
lib/Device/Nest.pm view on Meta::CPAN
$self->{'last_exec_time'} = eval{($time_after-$time_before)*1000};
$self->{'last_code'} = $response->code;
if ($response->is_success) {
my $decoded_response = decode_json($response->content);
# print Dumper($decoded_response);
return $decoded_response->{'thermostats'}->{$self->{'thermostat'}}->{$tag};
} else {
print "\n".(caller(1))[3]."(): Failed with return code ".$self->get_last_code()."\n";
return 0;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/PaloAlto/Firewall.pm view on Meta::CPAN
sub _get_pa_response {
my $self = shift;
my $http_response = shift;
my $xml_parser = XML::Twig->new();
my $pa_response_twig = $xml_parser->safe_parse( $http_response->decoded_content );
if (!$pa_response_twig) {
carp "Invalid XML returned from firewall";
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/RFXCOM/Response.pm view on Meta::CPAN
=over
=item unknown
for a message that could not be decoded
=item version
for a response to a version check request
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/RadioThermostat.pm view on Meta::CPAN
sub _ua_post {
my ( $self, $path, $data ) = @_;
my $response
= $self->{ua}->post( $self->{address} . $path, content => encode_json $data );
if ( $response->is_success ) {
my $result = decode_json $response->decoded_content();
# return $result;
return exists( $result->{success} ) ? 1 : 0;
}
else {
lib/Device/RadioThermostat.pm view on Meta::CPAN
sub _ua_get {
my ( $self, $path ) = @_;
my $response = $self->{ua}->get( $self->{address} . $path );
if ( $response->is_success ) {
return decode_json $response->decoded_content();
}
else {
my ($code, $err) = ($response->code, $response->message);
carp $code ? "$code response: $err" : "Connection error: $err";
return;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/TLSPrinter.pm view on Meta::CPAN
raw printer status as a string
=item
decoded printer status as a hash
=back
B<Example>
lib/Device/TLSPrinter.pm view on Meta::CPAN
raw cell status as a string
=item *
decoded cell status as a hash
=back
B<Example>
view all matches for this distribution
view release on metacpan or search on metacpan
* Have tracked down the cause of connection problems in Windows. It turns
out I believe to be a bug in Win32::SerialPort where the baudrate is not
being set correctly. A bug has been raised which I assume will be fixed in
the next version. See http://rt.cpan.org/Ticket/Display.html?id=25539
* The read_ax25_frame method in Device::TNC has been renamed to read_frame as
this not an AX.25 frame at this point. It's already been decoded by the TNC.
Though all the fields are containded in the frame except the FCS.
Release 0.02
* Fixed a bug that caused most of the data in the INFO field to be ignored.
* Now the full INFO field for the captured frame is being included.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/VantagePro.pm view on Meta::CPAN
DAYLIGHT_SAVINGS
GMT_OFFSET
GMT_OR_ZONE
SETUP_BITS
The return value is the raw hex value from the unit, so needs to be decoded:
my $rst = $self->get_eeprom('archive_period');
my $archive_period = hex($rst->[0]);
=head2 get_setup_bits
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/WS2500PC.pm view on Meta::CPAN
# response A hash-reference which will be filled with the reponse
# Return: 1 Always true
# The filled in hash reference has the following keys:
# {ok} 1 if the response has been valid and passed all checks, 0 upon failure
# {raw} Actual data received from the interface
# {message} The actual message, already decoded without any headers
# {datalength} The lenght in bytes of the message
# {checksum} The checksum of the message
sub read_Response ($;$) {
my $bytes_expected = shift;
my $response = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/WallyHome/Role/REST.pm view on Meta::CPAN
my $response = $self->_userAgent()->request($request);
$responseContent = $response->content();
}
my $decodedResponse = {};
eval {
$decodedResponse = decode_json($responseContent);
};
if ($@) {
$self->_lastApiError($@);
return undef;
}
return $decodedResponse;
}
sub _simulateTestResponse {
my ($self, $uri) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dezi/Aggregator/Mail.pm view on Meta::CPAN
my $msg_url = shift or croak "message url required";
my $attm = shift or croak "attachment object required";
my $type = $attm->body->mimeType->type;
my $filename = $attm->body->dispositionFilename;
my $content = $attm->decoded . ''; # force stringify
if ( $self->swish_filter_obj->can_filter($type) ) {
my $f = $self->swish_filter_obj->convert(
document => \$content,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dezi/Client.pm view on Meta::CPAN
}
my $resp = $self->{ua}->get($uri);
if ( !$resp->is_success ) {
croak $resp->status_line;
}
my $paths = from_json( $resp->decoded_content );
if ( !$resp->is_success
or !$paths
or !$paths->{search}
or !$paths->{index} )
{
croak "Bad response from server $self->{server}: "
. $resp->status_line . " "
. $resp->decoded_content;
}
$self->{search_uri} = $paths->{search};
$self->{index_uri} = $paths->{index};
$self->{commit_uri} = $paths->{commit};
$self->{rollback_uri} = $paths->{rollback};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DiaColloDB/WWW/CGI.pod view on Meta::CPAN
##
##-- CGI params
defaults => \%defaults, ##-- default parameter values (default={})
vars => \%vars, ##-- current parameters (after $dbcgi->vars())
charset => $charset, ##-- charset (default='utf-8')
nodecode => \%varnames, ##-- names of variables not to be decoded (default=none)
##
##-- CGI environment stuff : see getenv() method
remote_addr => $remote_addr,
remote_user => $remote_user,
request_method => $request_method,
view all matches for this distribution
view release on metacpan or search on metacpan
DiaColloDB/Relation/DDC.pod view on Meta::CPAN
=item ddcQuery
$results = $rel->ddcQuery($coldb, $query_or_str, %opts);
Returns decoded JSON results for DDC client query $query_or_str,
optionally logging the query and tracking errors.
%opts:
logas => $prefix, ##-- log prefix (default: 'ddcQuery()')
view all matches for this distribution
view release on metacpan or search on metacpan
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16le(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16be(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32le()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32be()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64le()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64be()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
|| defined _ARCH_PPC
/*
* Note: we do not declare cross-endian access to be "fast": even if
* using inline assembly, implementation should still assume that
* keeping the decoded word in a temporary is faster than decoding
* it again.
*/
#if defined __GNUC__
#if SPH_64_TRUE
#define SPH_DETECT_PPC64_GCC 1
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
view all matches for this distribution
view release on metacpan or search on metacpan
stringencoders/modp_b64.h view on Meta::CPAN
/**
* base 64 encode a string (self-modifing)
*
* This function is for C++ only (duh)
*
* \param[in,out] s the string to be decoded
* \return a reference to the input string
*/
inline std::string& b64_encode(std::string& s)
{
std::string x(b64_encode(s.data(), s.size()));
stringencoders/modp_b64.h view on Meta::CPAN
* base 64 decode a string (self-modifing)
* On failure, the string is empty.
*
* This function is for C++ only (duh)
*
* \param[in,out] s the string to be decoded
* \return a reference to the input string
*/
inline std::string& b64_decode(std::string& s)
{
std::string x(b64_decode(s.data(), s.size()));
view all matches for this distribution
view release on metacpan or search on metacpan
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16le(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16be(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32le()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32be()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64le()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64be()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
view all matches for this distribution
view release on metacpan or search on metacpan
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16le(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16be(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32le()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32be()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64le()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64be()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
view all matches for this distribution
view release on metacpan or search on metacpan
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16le(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16be(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32le()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32be()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64le()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64be()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
view all matches for this distribution
view release on metacpan or search on metacpan
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16le(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16be(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32le()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32be()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64le()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64be()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
view all matches for this distribution
view release on metacpan or search on metacpan
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16le(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16be(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32le()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32be()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64le()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64be()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
|| defined _ARCH_PPC
/*
* Note: we do not declare cross-endian access to be "fast": even if
* using inline assembly, implementation should still assume that
* keeping the decoded word in a temporary is faster than decoding
* it again.
*/
#if defined __GNUC__
#if SPH_64_TRUE
#define SPH_DETECT_PPC64_GCC 1
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
view all matches for this distribution
view release on metacpan or search on metacpan
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16le(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16be(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32le()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32be()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64le()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64be()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
|| defined _ARCH_PPC
/*
* Note: we do not declare cross-endian access to be "fast": even if
* using inline assembly, implementation should still assume that
* keeping the decoded word in a temporary is faster than decoding
* it again.
*/
#if defined __GNUC__
#if SPH_64_TRUE
#define SPH_DETECT_PPC64_GCC 1
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
view all matches for this distribution
view release on metacpan or search on metacpan
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16le(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16be(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32le()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32be()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64le()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64be()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
|| defined _ARCH_PPC
/*
* Note: we do not declare cross-endian access to be "fast": even if
* using inline assembly, implementation should still assume that
* keeping the decoded word in a temporary is faster than decoding
* it again.
*/
#if defined __GNUC__
#if SPH_64_TRUE
#define SPH_DETECT_PPC64_GCC 1
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
view all matches for this distribution
view release on metacpan or search on metacpan
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16le(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16be(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32le()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32be()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64le()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64be()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
|| defined _ARCH_PPC
/*
* Note: we do not declare cross-endian access to be "fast": even if
* using inline assembly, implementation should still assume that
* keeping the decoded word in a temporary is faster than decoding
* it again.
*/
#if defined __GNUC__
#if SPH_64_TRUE
#define SPH_DETECT_PPC64_GCC 1
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
view all matches for this distribution
view release on metacpan or search on metacpan
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16le(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16be(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32le()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32be()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64le()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64be()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
view all matches for this distribution
view release on metacpan or search on metacpan
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16le(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16be(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32le()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32be()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64le()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64be()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
view all matches for this distribution
view release on metacpan or search on metacpan
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16le(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 16-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline unsigned sph_dec16be(const void *src);
/**
* Encode a 16-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32le()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32le_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first).
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be(const void *src);
/**
* Decode a 32-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* source address is suitably aligned for a direct access, if the platform
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec32be()</code> function.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u32 sph_dec32be_aligned(const void *src);
/**
* Encode a 32-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in little-endian convention
* (least significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64le()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64le_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in little-endian convention
src/sph_types.h view on Meta::CPAN
* Decode a 64-bit unsigned value from memory, in big-endian convention
* (most significant byte comes first). This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be(const void *src);
/**
* Decode a 64-bit unsigned value from memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
* supports such things; it can thus be marginally faster than the generic
* <code>sph_dec64be()</code> function. This function is defined only
* if a suitable 64-bit type was detected and used for <code>sph_u64</code>.
*
* @param src the source address
* @return the decoded value
*/
static inline sph_u64 sph_dec64be_aligned(const void *src);
/**
* Encode a 64-bit unsigned value into memory, in big-endian convention
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 32-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (32-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u32
sph_dec32le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (big endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64be_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
*
* @param src the source buffer
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le(const void *src)
{
#if defined SPH_UPTR
src/sph_types.h view on Meta::CPAN
/**
* Decode a 64-bit value from the provided buffer (little endian convention).
* The source buffer must be properly aligned.
*
* @param src the source buffer (64-bit aligned)
* @return the decoded value
*/
static SPH_INLINE sph_u64
sph_dec64le_aligned(const void *src)
{
#if SPH_LITTLE_ENDIAN
view all matches for this distribution