What is Compression: Definition and 630 Discussions

Lossless compression is a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data. By contrast, lossy compression permits reconstruction only of an approximation of the original data, though usually with greatly improved compression rates (and therefore reduced media sizes).
By operation of the pigeonhole principle, no lossless compression algorithm can efficiently compress all possible data. For this reason, many different algorithms exist that are designed either with a specific type of input data in mind or with specific assumptions about what kinds of redundancy the uncompressed data are likely to contain.
Lossless data compression is used in many applications. For example, it is used in the ZIP file format and in the GNU tool gzip. It is also often used as a component within lossy data compression technologies (e.g. lossless mid/side joint stereo preprocessing by MP3 encoders and other lossy audio encoders).
Lossless compression is used in cases where it is important that the original and the decompressed data be identical, or where deviations from the original data would be unfavourable. Typical examples are executable programs, text documents, and source code. Some image file formats, like PNG or GIF, use only lossless compression, while others like TIFF and MNG may use either lossless or lossy methods. Lossless audio formats are most often used for archiving or production purposes, while smaller lossy audio files are typically used on portable players and in other cases where storage space is limited or exact replication of the audio is unnecessary.

View More On Wikipedia.org
  1. F

    I Yet again about (real) gas compression

    With a real inert gas (i.e. nitrogen N2) being compressed in a piston-like configuration, I'd like to estimate the peak pressure and peak temperature at the instant the gas is brought to full compression. Initial pressure and initial temperature (in the uncompressed state) are known: typically...
  2. Villiers

    Comp Sci Answer: Dictionary Compression: Solving the Mystery of "01

    Hi I have the answer to the dictionary compression question- but can't understand the following in the notes: Instead, the word could be added to a dictionary and assigned the binary code 01 which is a reduction of 38 bits for each occurrence - what does this mean? This is the extract in...
  3. A

    Fluid mechanics - Additional liquid capacity due to compression

    A cylindrical tube (diameter = D, width = L) is completely filled with a liquid (density = ρ). A pump pressurizes the system with a pressure P. Consequently, 1) the solid tube is compressed and deformed according to Hooke's law (σ = ε.E), and 2) the liquid is compressed and deformed, following...
  4. R

    I Gas compression - does it double the energy?

    It takes energy to compress an ideal gas, and that same amount of energy is output as heat. But we also gain the potential energy of the compressed gas. It seems to me that we are doubling up our energy. Can anybody explain in simple, practical terms (to a humble mech engineer) how this works...
  5. S

    Work done in adiabatic compression

    The equation I know for adiabatic work is W = P1V1((V1/V2)ϒ-1 - 1))/ϒ-1, but this involves ϒ, but I can use ϒ = Cp/Cv = Cv+R/Cv = 1 + Cv/R, does this seem correct? But I still have a P1
  6. A

    Design Tool for Compression Testing of Small Samples

    Hello all, I am looking for some design ideas. I need to do some compression testing and here is my testing platens: The platens are small (5mm*5 mm) and my samples are even smaller with the cross section of 3mm*2.4mm, so it would be difficult to both position them within the platens and align...
  7. shivajikobardan

    Comp Sci Confusion on motion estimation block diagram-MPEG video compression-:

    My doubts are as follows-: -> Why frame n is not segmented to blocks? -> Why no inputs from (n-1) side for block matching? -> What do we do in prediction error coding? Source-: https://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/AV0506/s0561282.pdf I have read this many times but that...
  8. shivajikobardan

    MHB Confusion on motion estimation block diagram-MPEG video compression-:

    https://lh4.googleusercontent.com/g6wQjnQ6p3IVt86-_kwnNVwyOb_iUxUXWChyf0XZR5PO17uOnPbNhCxdpfUSScvU8sAR8Al2FNRMoeMEqLUUuJsvGOSnpFO94tutB2h-927rxVYRDUGzi-JF9FYs9hKivGdCvrAP My doubts are as follows-: -> Why frame n is not segmented to blocks? -> Why no inputs from (n-1) side for block matching...
  9. Lantean

    Deformable solids : Traction / Compression

    Hi, I use the equation above to isolate N(x), I get ##N = -\int_0^x qdx## I don't know how to get the value of q. The dimensionnal analysis give me : ## q = \frac{\rho g S x}{L}##, but I'm not sure. Thanks for your help !
  10. dge

    Spring compression -- Ball colliding with a spring-mounted platform

    I've tried establishing a systems of equations with -(1/2)kx^2+mpgx+(1/2)mpvp^2=0, but this leads to an annoying quadratic that when solved does not give one of the listed answers. My thought was that the spring's potential energy is going to be equal to the gravitational potential energy and...
  11. cianfa72

    I About Reversible vs Irreversible Gas Compression and Expansion Work

    Hi, reading the interesting Reversible vs Irreversible Gas Compression and Expansion Work insight by @Chestermiller I would like to ask for clarification on some points. In the second bullet at the beginning my understanding is as follows: consider an ideal gas contained in a cylinder...
  12. dge

    How can I calculate the potential energy stored in a compressed spring?

    I feel like I've gotten stuck on this. I know the work done is equal to the kinetic energy of block A, but I can't figure out how I would find the potential energy stored in the spring without using the spring constant in the equation. W = FA * dA + U
  13. C

    B Thought Experiment: Does Gravity's Compression Warm an Object?

    Thought experiment: (1.1) You have a homogenous object, made of one element, floating in space. (1.2) Gravity has completed the process of accelerating its atoms and molecules into the final state, such that the object is a crystalline sphere. (1.3) Gravity continues to act on the object, even...
  14. W

    Principal component analysis and data compression in Machine Learning

    I wonder how to accurately perform data compression on the m x n matrix X using PCA. Each row is a data point, and each column is a feature. So m data points with n features. If I like to go k < n dimensions, how is the correct way of doing so? How to I accurately create the matrix W_k, which...
  15. Chestermiller

    I Expansion or Compression Work by Gas ##=\int{P_{ext}dV}##

    In private discussions, another member @burian and I have been discussing why, in compression and expansion of a gas, the work can be calculated from ##W=\int{P_{ext}dV}##. We thought it would be of value to open the discussion to the full membership. Burian last asked about: When the...
  16. M

    Tension and compression forces on a femur bone

    Summary:: Hello all, I need help with this question, ill attach the equations i managed to solve. How do i continue from there?
  17. F

    Instantaneous Gas Compression: temperature increase?

    If I a have a gas confined in a certain initial volume Vin at a certain pressure Pin and at a certain temperature Tin, and istantaneously compress it down to a final volume Vfin < Vin, how do I calculate the increase in temperature? Assume I know the exact pressure curve (P vs. V). The system...
  18. Quester

    Coil Compression Spring Reaction to a Pulse

    I am trying to understand the reaction of a steel coil compression spring when pulsed. The spring I am interested in has the following physical characteristics: k (spring constant in pounds per inch) = 2.88 d (wire diameter in inches) = .043 n (number of active coils) = 29 D (mean diameter of...
  19. anorlunda

    Impressive Video Data Compression

    https://arxiv.org/pdf/2011.15126.pdf https://nvlabs.github.io/face-vid2vid/ https://wandb.ai/ayush-thakur/face-vid2vid/reports/Overview-of-One-Shot-Free-View-Neural-Talking-Head-Synthesis-for-Video-Conferencing--Vmlldzo1MzU4ODc One thing in this modern world seems to be ubiquitous; the demand...
  20. T

    Automotive Factors affecting compression spring oscillations

    Hi all, I'm studying the compression spring design issue that occurred in a machine design application. As illustrated below, spring is bouncing or oscillating after impact to a stopping surface (1 -> 2 -> 3 -> 4) and eventually stop after few bounces. Ideal case for this application is to...
  21. Ameen1985

    Isothermal and adiabatic air compression -- different expressions

    Hi all, For an Isothermal compression process of air in a vessel with constant volume, I found the following expressions and and The first two give the same result, meanwhile the third gives another solution and I don't know why. For adiabatic compression I found these two expression which...
  22. D

    Engineering Compression buckling of column

    Hi, all. The top beam is subjected to uniformly distributed load. FYI, the column is 5m in length. As you can see, the major axis of column is connected to the beam with moment connection on top. However, in the minor axis of column, there's nothing to connecting them.For the major axis, the...
  23. Y

    Why is Point A in Compression in a Simplified Crankshaft with a Load P?

    Summary:: I'm stuck on a year 2 mechanics question. I have this simplified crankshaft with a load P at the end. The solutions to the exercise have said that point A is in compression due to a bending moment but I don't understand why that is. The solutions and my calculations have both come out...
  24. J

    Conservation: Mass Dropped onto a Spring, Find the Compression

    First I wanted to find the kinetic energy the mass had when it hit the spring (converted from the potential Energy it had) thus Ek=mgh=9.8*2.6*3.5=89.18 Now I know as this Ek changes to 0 the potential energy of the spring as its being compressed will be at its maximum so, Ek=Ep...
  25. K

    Selection of a compression spring

    Summary:: What does I need to consider in order to get the right spring? Hello. I need a compression spring that require 10 lbs of force in order to be compressed 1cm. The springs outer diameter (De) has to be 1cm. The spring will be made out of piano wire. Which values of specification does...
  26. S

    Compression ratio and volume reduction of CO2

    The question is: If the compression ratio of car engines is increased by 10% (from 10 to 11), estimate the volume reduction in annual CO2 emission. Assume there are 30 million cars each consuming one cubic meter of fuel annually. The question is looking for a rough estimate for an answer. I...
  27. person123

    Why are two pieces of wood stronger when bound together?

    The answer learned in class is that the two 2*4s are able to distribute the load over both of them, but I don't think this is an actual answer because that's balanced by the fact that each block is half the area. Does anyone know of the reason for this observation? Thanks!
  28. Whipley Snidelash

    Where do I fit in the history of data compression?

    In 1982 I was given a ZX Spectrum by a Timex employee. It was one of only three English units that had been converted to NTSC from PAL. They worked for Timex but had their own company on the side to write software for the Timex computer and for the spectrum They hired me to do the title screen...
  29. E

    Gravitational compression work

    When I did this the first time I didn't really think too much about it, so I just wrote$$p = \frac{nRT}{V} \implies W = \Delta U - Q = - Q = -\int_{\frac{4}{3}\pi r_0^3}^{\frac{4}{3}\pi r^3} \frac{nRT}{V} dV$$That turned out to be correct, but when I thought about it I didn't understand why this...
  30. E

    Compression of a superconducting spring

    Let the length of the spring be ##x##, so that the extension in any given configuration is ##\delta = |x_0 - x|##. The magnetic flux through such a coil is $$\Phi = \frac{\mu_0 I N^2 A}{x}$$The fact that the coil is superconducting means that the flux linked will always remain constant even with...
  31. LCSphysicist

    Young's modulus and compression

    See this figure: The rod is put at first between A and B shims without comprehension, suddenly a force is applied at R from an axis as the figure points. Find Fa and Fb. (the figure is a look from above) This can be solved by consider the "constant elastic" of the shims equal, but my...
  32. hilbert2

    A 2-electron system under compression

    I did some calculations for the ground state energy and wave function of a system of two electrons put in a finite-depth 2D potential well. Regardless of the shape of the potential well (square or circular), the expectation value of the electron-electron distance ##\langle r_{12}\rangle =...
  33. B

    A Quantum Period is Compression Robust

    https://arxiv.org/abs/1905.10074 The paper finds that one can reduce the number of qubits to a constant (just one works) used in the last, modular exponential register of the variants of Shor's algorithm, used to factor integers and find discrete logarithms, by applying a universal hash...
  34. E

    Adiabatic compression

    This is a relatively simple problem, but I'm not getting the right answer. For adiabatic compression, work on gas is positive, since work on gas = ΔEth and the adiabatic process moves from a lower isotherm to a higher one. Integrating for work gives: pV * (Vf(1 - gamma) - Vi(1 -...
  35. H

    Basic Compression Spring Theory

    Hi Guys, Forgive me, as it has been quite sometime since I have done my spring theory. The problem I am having is the following: This is the current situation: - In a steel block I have a pocket depth of 15mm - I have a compression spring with the following information: Outside diameter is...
  36. mastermechanic

    A Non-quasi-static Air Compression Calculation

    Hello Everyone, As some of you know, there are airsoft guns which work with a spring and piston mechanism. An electric motor drives a semicircle gear and that gear drives a rack gear connected to piston. When the gear compresses the spring and reaches semicircle’s free end the piston...
  37. G

    Pump with intake and compression using different pressure ratios

    Lets say we got a larger cylinder-piston combo and a smaller one. First we move the larger cylinder, filling in with vacuum. Then we pump in air, using the smaller cylinder, isothermally, with variable expansion ratio. Here, we clearly have exp ratio > P_atm/P_final We then compress the larger...
  38. E

    Maximum compression of a spring?

    I found the amplitude of the simple harmonic motion that results (0.367, and I know this is correct because I entered it and it was marked as a correct answer), and assumed it would be the same value for the maximum compression since x(t) = Acos(wt). And, since the maximum value of cosine is 1...
  39. Kaushik

    Compression in an adiabatic enclosure

    I found the below lines : Could you please explain the above lines?
  40. E

    Two different answers for work done during compression

    I'm having a little trouble with part a) of this question: Since it is stated that the heating is slow, I thought it was reasonable to assume the process is reversible which means that the pressure in both sides should be equal. Consequently, $$W = - \int_{V_{0}}^{V_{1}} P dV = -...
  41. S

    Maximum compression of spring

    1/2 m v2 + mgh = 1/2 k x2 1/2 (5) (9) + (5) (9.81) x = 1/2 (200) x2 100 x2 - 49.05 x - 22.5 = 0 x = 0.779 m or x = - 0.289 m Answer key says the answer is 0.289 m but in my opinion the answer should be 0.799 m because I take h = 0 at the position where the spring has maximum compression so...
  42. D

    Isenthropic compression 5000L, 5Bar, 2500L, 288K

    Hello Pressure by P2=P1*V1/P2 which comes out to 10 Bar Density by P/Rd/T which comes out to 12,09 Kg/M3 according to the homework equation T2 would equal 144K, but if you compress air does it not heat up?
  43. spacestrudel

    How to find the max. compression of a spring given a block on an incline?

    Hello! I am stuck on part of a problem and was wondering what I am doing wrong. For part a of the problem, we were asked to find the impact speed. I did this in a photo below given the following values: Θ = 30 degrees. The initial velocity = 10 m/s. The coefficient of kinetic friction = 0.4...
  44. A

    Maximum Compression for a Block on Spring

    Hi everyone, just a quick question.. I tried this problem using Newtons laws, not conservation of energy, and I got an answer exactly half of what the correct answer is, and I'm not sure why. Here is what I did: Net force = zero once the spring is compressed, therefore mg - kx = 0 mg = kx...
  45. Thurirl

    Creating slag through magnetic compression

    This is simply a top of the head idea that seems kinda cool but I don't really know what it could be good for. My idea was, would it be possible through the use of magnetic pressure can a metal be reduced to a slag or almost liquid like state? I know that more than likely it isn't possible due...
  46. Kaushik

    The ratio of compression of springs from three different setups

    I got the compression for the first one. Second one, i am a bit confused. But i got ## x_2 = \frac{F}{2k} ## In the third one, what will the compression be? I have to get the ratio ## x_2 : x_3 ## . Then i will be able to get my answer. Thanks.
  47. Superposed_Cat

    Image Compression you can implement in a day

    I need to implement a decent image compression algorithm in a day or two, without using libraries. So it can't be anything with multiple layers, like jpeg. I was thinking huffman encoding, Which would be a good algorithm I can learn to implement in a day or two that is not terrible at it's job.
  48. DennisN

    Bug Image degradation (compression?) in copied threads

    Hi! I recently noticed that posted images can lose quality when they are copied from a thread to a new thread. It seems they undergo some extra compression, and I don't understand why. Compare for instance the photos in this PF photo contest thread with the photos in the corresponding vote...
Back
Top