Telegram iOS

repository·master·Indexed 27 days ago

https://github.com/telegrammessenger/telegram-ios

Source code for the Telegram iOS application. Includes a build system based on Bazel and Python scripts for compiling the app, generating Xcode projects, and creating IPAs. Documentation covers requirements for obtaining an api_id, compilation guides for development and App Store releases, and troubleshooting for Xcode build errors.

Tokens
111.6K
Snippets
256
Records
625
Agent score
93%

What's inside telegram-ios

  1. Overview of jpegli decoder improvements

    master

    The jpegli decoder includes the following enhancements:

    • High Bit-Depth Output: Supports 16-bit unsigned and 32-bit floating point output buffers.
    • Laplacian Dequantization: Non-zero DCT coefficients are dequantized to the expectation value of their respective quantization intervals, assuming a Laplacian distribution of the original unquantized coefficients.
    • Floating Point Pipeline: After dequantization, inverse DCT, chroma upsampling, and color space conversions are performed in floating point precision. Integer sample conversion happens only in the final output phase (unless floating point output was explicitly requested).
  2. Overview of SwiftMath

    master
    SwiftMath is a Swift implementation of iosMath used for rendering LaTeX math equations in native iOS and macOS applications. It typesets formulae into a UILabel equivalent class using LaTeX typesetting rules. It is designed as a high-performance alternative to web-based solutions like MathJax or KaTeX, avoiding the need for UIWebView or JavaScript.
  3. Overview of PFFFT FFT Library

    master

    PFFFT is a fast, small, and single-precision 1D Fast Fourier Transform (FFT) library for real and complex vectors. It is designed to be efficient on a wide range of CPUs by utilizing SIMD instructions:

    • x86: SSE1
    • PowerPC: Altivec
    • ARM: NEON

    Key characteristics:

    • Real-time friendly: The FFT functions do not perform any memory allocation; instead, they require a user-provided 'work' array.
    • Small footprint: The implementation consists of only two files: pffft.c and pffft.h.
    • Convolution support: It provides
  4. Overview of Fast-lossless JXL encoder

    master

    The Fast-lossless tool is a standalone JXL encoder script designed for high-speed lossless compression. It supports 1- to 4-channel images and animations with up to 16-bit depth.

    Performance characteristics:

    • 8-bit nonphoto content: Compression may be slightly worse than PNG.
    • All other situations: Compression is better or much better than PNG.

    The encoder automatically selects and executes a SIMD implementation based on your CPU's capabilities. The core logic is contained in lib/jxl/enc_fast_lossless.{cc,h}.

  5. Overview of jpegli encoder improvements

    master

    The jpegli encoder provides several advanced features compared to standard implementations:

    • High Bit-Depth Support: Supports 16-bit unsigned and 32-bit floating point input buffers.
    • Floating Point Precision: Color space conversions, chroma subsampling, and DCT are performed in floating point precision. Integer conversion occurs only during the final production of quantized DCT coefficients.
    • Distance-Based Quality: Quality can be specified via a distance parameter (analogous to JPEG XL). Quantization tables are selected based on this distance and chroma subsampling mode, with separate quantization tables for red and blue chrominance channels.
    • Adaptive Dead-Zone Quantization: Uses higher quantization thresholds for zero coefficients in noisy image areas compared to smoother areas.
    • XYB Colorspace Support: Efficiently compresses JPEGs with an ICC profile representing the XYB colorspace by using specialized quantization tables for X, Y, and B channels instead of converting to YCbCr.
  6. Overview of libSRTP

    master

    libSRTP is an open-source implementation of the Secure Real-time Transport Protocol (SRTP), the Universal Security Transform (UST), and a supporting cryptographic kernel. It provides functions to protect RTP and RTCP packets by providing confidentiality to RTP data and authentication to the RTP header and payload, as defined in RFC 3711.

    Key components include:

    • SRTP API: Documented in include/srtp.h.
    • Compiled Library: Available as libsrtp2.a after compilation.
    • Core Functions: srtp_protect() turns RTP packets into SRTP packets; srtp_unprotect() turns SRTP packets back into RTP packets.
  7. Overview of BoringSSL

    master

    BoringSSL is a fork of OpenSSL designed for Google's specific needs. It is used in Chrome/Chromium, Android, and other applications.

    Warning for Third-Party Developers: BoringSSL is not intended for general use. There are no guarantees of API or ABI stability. Programs using BoringSSL typically ship their own copies of the library to manage updates and API changes independently. Relying on it as a third-party dependency is likely to be frustrating due to these stability constraints.

  8. Overview of libyuv functionality

    master

    libyuv is an open source project providing YUV scaling and conversion functionality. It is optimized for various architectures including SSSE3/AVX2 (x86/x64), Neon (Arm), MSA (Mips), and RVV (RISC-V).

    Key capabilities include:

    • Scaling: Scale YUV using point, bilinear, or box filters to prepare content for compression.
    • Conversion (to YUV): Convert webcam formats to YUV for compression.
    • Conversion (to RGB): Convert YUV to RGB formats for rendering or effects.
    • Rotation: Rotate images by 90, 180, or 270 degrees to handle mobile device portrait orientation.
  9. Overview of mozjpeg

    master

    mozjpeg is a fork of libjpeg-turbo designed to reduce JPEG file sizes and web page load times. It achieves this through optimized Huffman trees, progressive entropy coding, separate DCT coefficient scans, and Trellis quantization.

    Note on Performance: mozjpeg is highly asymmetric. It is significantly slower at compressing images than libjpeg-turbo or libjpeg, making it unsuitable for real-time compression. It is best used in web encoding workflows where high compression ratios are prioritized over encoding speed.

  10. Overview of MozJPEG

    master
    MozJPEG is a high-efficiency JPEG encoder that improves compression efficiency, achieving higher visual quality and smaller file sizes compared to standard encoders. It is a patch for libjpeg-turbo and is designed to be a drop-in replacement that is compatible with the libjpeg API and ABI. All MozJPEG improvements can be disabled at runtime, causing it to behave exactly like libjpeg-turbo.