HEX
Server: nginx/1.22.1
System: Linux iZuf67d4hh2ssx30nkok6dZ 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: www (1000)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: //usr/lib64/python2.7/site-packages/PIL/_binary.py
#
# The Python Imaging Library.
# $Id$
#
# Binary input/output support routines.
#
# Copyright (c) 1997-2003 by Secret Labs AB
# Copyright (c) 1995-2003 by Fredrik Lundh
# Copyright (c) 2012 by Brian Crowell
#
# See the README file for information on usage and redistribution.
#

if bytes is str:
    def i8(c):
        return ord(c)

    def o8(i):
        return chr(i&255)
else:
    def i8(c):
        return c if c.__class__ is int else c[0]

    def o8(i):
        return bytes((i&255,))

# Input, le = little endian, be = big endian
def i16le(c, o=0):
    return i8(c[o]) | (i8(c[o+1])<<8)

def i32le(c, o=0):
    return i8(c[o]) | (i8(c[o+1])<<8) | (i8(c[o+2])<<16) | (i8(c[o+3])<<24)

def i16be(c, o=0):
    return (i8(c[o])<<8) | i8(c[o+1])

def i32be(c, o=0):
    return (i8(c[o])<<24) | (i8(c[o+1])<<16) | (i8(c[o+2])<<8) | i8(c[o+3])

# Output, le = little endian, be = big endian
def o16le(i):
    return o8(i) + o8(i>>8)

def o32le(i):
    return o8(i) + o8(i>>8) + o8(i>>16) + o8(i>>24)

def o16be(i):
    return o8(i>>8) + o8(i)

def o32be(i):
    return o8(i>>24) + o8(i>>16) + o8(i>>8) + o8(i)